container
Source: base/pkg/kusion_models/kube/frontend/container/container.k
Schema Main
Main describes the main container configuration that is expected to be run on the host.
Attributes
Name and Description | Type | Default Value | Required |
---|---|---|---|
name A Container-level attribute. The container name. Each container in a pod must have a unique name. | str | "main" | required |
command A Container-level attribute. The startup command of main process. The image's entrypoint is used if this is not provided. | [str] | Undefined | optional |
args A Container-level attribute. The startup arguments of main process. The image's cmd is used if this is not provided. | [str] | Undefined | optional |
useBuiltInEnv useBuiltInEnv indicates use built-in envs or not. | bool | False | optional |
env A Container-level attribute. List of environment variables in the container. | [env.Env] | Undefined | optional |
envFrom A Container-level attribute. List of sources to populate environment variables in the container. | [env.EnvFromSource] | Undefined | optional |
ports A Container-level attribute. List of network ports in the container. | [port.ContainerPort] | Undefined | optional |
livenessProbe A Container-level attribute. The probe to check whether container is live or not. | p.Probe | Undefined | optional |
readinessProbe A Container-level attribute. The probe to check whether container is ready or not. The default value can be referred to presupposed template: base/pkg/kusion_models/templates/sofa_probe.k | p.Probe | Undefined | optional |
startupProbe A Container-level attribute. The probe to indicates that the Pod has successfully initialized. | p.Probe | Undefined | optional |
lifecycle | lc.Lifecycle | Undefined | optional |
workingDir | str | Undefined | optional |
securityContext | {str: any} | Undefined | optional |
Examples
import base.pkg.kusion_models.kube.frontend.container
import base.pkg.kusion_models.kube.frontend.container.probe as p
main = container.Main {
name = "test"
livenessProbe = p.Probe {
handler = p.Http {
path = "/healthz"
}
initialDelaySeconds = 10
}
}