LabInitContainer#

pydantic model controller.config.LabInitContainer#

A container to run as an init container before the user’s lab.

Parameters:

data (Any) –

Show JSON schema
{
   "title": "LabInitContainer",
   "description": "A container to run as an init container before the user's lab.",
   "type": "object",
   "properties": {
      "name": {
         "description": "Name of the init container run before the user lab starts. Must be unique across all init containers.",
         "examples": [
            "multus-init"
         ],
         "title": "Name of container",
         "type": "string"
      },
      "image": {
         "allOf": [
            {
               "$ref": "#/$defs/ContainerImage"
            }
         ],
         "title": "Image to run"
      },
      "privileged": {
         "default": false,
         "description": "Whether the init container needs to run privileged to do its job. Set to true if, for example, it has to configure networking or change ownership of files or directories.",
         "examples": [
            false
         ],
         "title": "Run container privileged",
         "type": "boolean"
      },
      "volumeMounts": {
         "default": [],
         "description": "Volumes mounted inside this init container",
         "items": {
            "$ref": "#/$defs/VolumeMountConfig"
         },
         "title": "Volume mounts",
         "type": "array"
      }
   },
   "$defs": {
      "ContainerImage": {
         "additionalProperties": false,
         "description": "Docker image that may be run as a container.\n\nThe structure of this model should follow the normal Helm chart\nconventions so that `Mend Renovate`_ can detect that this is a Docker\nimage reference and create pull requests to update it automatically.",
         "properties": {
            "repository": {
               "description": "Docker repository from which to pull the image",
               "examples": [
                  "docker.io/lsstit/ddsnet4u"
               ],
               "title": "Repository",
               "type": "string"
            },
            "pullPolicy": {
               "allOf": [
                  {
                     "$ref": "#/$defs/PullPolicy"
                  }
               ],
               "default": "IfNotPresent",
               "description": "Kubernetes image pull policy. Set to ``Always`` when testing images that reuse the same tag.",
               "examples": [
                  "Always"
               ],
               "title": "Pull policy"
            },
            "tag": {
               "description": "Tag of image to use (conventionally the version)",
               "examples": [
                  "1.4.2"
               ],
               "title": "Image tag",
               "type": "string"
            }
         },
         "required": [
            "repository",
            "tag"
         ],
         "title": "ContainerImage",
         "type": "object"
      },
      "PullPolicy": {
         "description": "Pull policy for Docker images in Kubernetes.",
         "enum": [
            "Always",
            "IfNotPresent",
            "Never"
         ],
         "title": "PullPolicy",
         "type": "string"
      },
      "VolumeMountConfig": {
         "additionalProperties": false,
         "description": "The mount of a volume inside a container.",
         "properties": {
            "containerPath": {
               "description": "Absolute path at which to mount the volume in the lab container",
               "examples": [
                  "/home"
               ],
               "pattern": "^/.*",
               "title": "Path inside container",
               "type": "string"
            },
            "subPath": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Mount only this sub-path of the volume source",
               "examples": [
                  "groups"
               ],
               "title": "Sub-path of source to mount"
            },
            "readOnly": {
               "default": false,
               "description": "Whether the volume should be mounted read-only in the container",
               "examples": [
                  true
               ],
               "title": "Is read-only",
               "type": "boolean"
            },
            "volumeName": {
               "description": "Name of the volume to mount",
               "title": "Volume name",
               "type": "string"
            }
         },
         "required": [
            "containerPath",
            "volumeName"
         ],
         "title": "VolumeMountConfig",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "name",
      "image"
   ]
}

Fields:
field image: ContainerImage [Required]#
field name: str [Required]#

Name of the init container run before the user lab starts. Must be unique across all init containers.

field privileged: bool = False#

Whether the init container needs to run privileged to do its job. Set to true if, for example, it has to configure networking or change ownership of files or directories.

field volumeMounts: list[VolumeMountConfig] = [] (name 'volume_mounts')#

Volumes mounted inside this init container