Skip to main content

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 DescriptionTypeDefault ValueRequired
name
A Container-level attribute.
The container name. Each container in a pod must have a unique name.
strUndefinedrequired
command
A Container-level attribute.
The startup command of main process. The image's entrypoint is used if this is not provided.
[str]Undefinedoptional
args
A Container-level attribute.
The startup arguments of main process. The image's cmd is used if this is not provided.
[str]Undefinedoptional
env
A Container-level attribute.
List of environment variables in the container.
[env.Env]Undefinedoptional
envFrom
A Container-level attribute.
List of sources to populate environment variables in the container.
[env.EnvFromSource]Undefinedoptional
ports[port.ContainerPort]Undefinedoptional
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
strUndefinedrequired
readinessProbe
A Container-level attribute.
The probe to check whether container is ready or not.
p.ProbeUndefinedoptional
livenessProbe
A Container-level attribute.
The probe to check whether container is live or not.
p.ProbeUndefinedoptional
startupProbe
A Container-level attribute.
The probe to indicates that the Pod has successfully initialized.
p.ProbeUndefinedoptional
lifecycle
Actions that the management system should take in response to container lifecycle events.
Cannot be updated.
lc.LifecycleUndefinedoptional
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.
strUndefinedoptional
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}Undefinedoptional

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
}
}