sidecar
Source: base/pkg/kusion_models/kube/frontend/sidecar/sidecar.k
Schema Sidecar
Sidecar describes the sidecar 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 | Undefined | 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 |
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 | [port.ContainerPort] | Undefined | optional |
resource A Pod-level attribute. Sidecar container resource. | str | resource.Resource | "1<cpu<2,1Gi<memory<2Gi,disk=20Gi" | required |
image A Container-level attribute. Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images | str | Undefined | required |
readinessProbe A Container-level attribute. The probe to check whether container is ready or not. | p.Probe | Undefined | optional |
livenessProbe A Container-level attribute. The probe to check whether container is live or not. | p.Probe | Undefined | optional |
startupProbe A Container-level attribute. The probe to indicates that the Pod has successfully initialized. | p.Probe | Undefined | optional |
lifecycle Actions that the management system should take in response to container lifecycle events. Cannot be updated. | lc.Lifecycle | Undefined | optional |
workingDir Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. | str | Undefined | optional |
securityContext SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ | {str: any} | Undefined | optional |
Examples
import base.pkg.kusion_models.kube.frontend.sidecar as s
import base.pkg.kusion_models.kube.frontend.container.probe as p
sidecar = s.Sidecar {
name = "test"
livenessProbe = p.Probe {
handler = p.Http {
httpPath = "/healthz"
}
initialDelaySeconds = 10
}
}