Skip to main content
Version: v0.10 🚧

container

Schema Container

Container describes how the Application's tasks are expected to be run. Depending on
the replicas parameter 1 or more containers can be created from each template.

Attributes

Name and DescriptionTypeDefault ValueRequired
image
Image refers to the Docker image name to run for this container.
More info: https://kubernetes.io/docs/concepts/containers/images
strUndefinedrequired
command
Entrypoint array. Not executed within a shell.
Command will overwrite the ENTRYPOINT value set in the Dockfile, otherwise the Docker
image's ENTRYPOINT is used if this is not provided.
[str]Undefinedoptional
args
Arguments to the entrypoint.
Args will overwrite the CMD value set in the Dockfile, otherwise the Docker
image's CMD is used if this is not provided.
[str]Undefinedoptional
env
List of environment variables to set in the container.
The value of the environment variable may be static text or a value from a secret.
{str: str}Undefinedoptional
workingDir
The working directory of the running process defined in entrypoint.
Default container runtime will be used if this is not specified.
strUndefinedoptional
resources
Map of resource requirements the container should run with.
The resources parameter is a dict with the key being the resource name and the value being
the resource value.
{str: str}Undefinedoptional
files
List of files to create in the container.
The files parameter is a dict with the key being the file name in the container and the value
being the target file specification.
{str: container.FileSpec}Undefinedoptional
dirs
Collection of volumes mount into the container's filesystem.
The dirs parameter is a dict with the key being the folder name in the container and the value
being the referenced volume.
{str: str}Undefinedoptional
livenessProbe
LivenessProbe indicates if a running process is healthy.
Container will be restarted if the probe fails.
p.ProbeUndefinedoptional
readinessProbe
ReadinessProbe indicates whether an application is available to handle requests.
p.ProbeUndefinedoptional
startupProbe
StartupProbe indicates that the container has started for the first time.
Container will be restarted if the probe fails.
p.ProbeUndefinedoptional
lifecycle
Lifecycle refers to actions that the management system should take in response to container lifecycle events.
lc.LifecycleUndefinedoptional

Examples

import catalog.models.schema.v1.workload.container as c

web = c.Container {
image: "nginx:latest"
command: ["/bin/sh", "-c", "echo hi"]
env: {
"name": "value"
}
resources: {
"cpu": "2"
"memory": "4Gi"
}
}

Schema FileSpec

FileSpec defines the target file in a Container.

Attributes

Name and DescriptionTypeDefault ValueRequired
content
File content in plain text.
strUndefinedoptional
contentFrom
Source for the file content, reference to a secret of configmap value.
strUndefinedoptional
mode
Mode bits used to set permissions on this file, must be an octal value
between 0000 and 0777 or a decimal value between 0 and 511
strUndefinedrequired

Examples

import catalog.models.schema.v1.workload.container as c

tmpFile = c.FileSpec {
content: "some file contents"
mode: "0777"
}