diff --git a/docs/generated/kuma-cp.md b/docs/generated/kuma-cp.md index e5432ecf1e33..86cfa9afcd71 100644 --- a/docs/generated/kuma-cp.md +++ b/docs/generated/kuma-cp.md @@ -316,6 +316,9 @@ runtime: memory: 512Mi # ENV: KUMA_INJECTOR_SIDECAR_CONTAINER_RESOURCES_LIMITS_MEMORY # Additional environment variables that can be placed on Kuma DP sidecar envVars: {} # ENV: KUMA_RUNTIME_KUBERNETES_INJECTOR_SIDECAR_CONTAINER_ENV_VARS + # If true, it enables a postStart script that waits until Envoy is ready. + # With the current Kubernetes behavior, any other container in the Pod will wait until the script is complete. + waitForDataplaneReady: false # ENV: KUMA_RUNTIME_KUBERNETES_INJECTOR_SIDECAR_CONTAINER_WAIT_FOR_DATAPLANE_READY # InitContainer defines configuration of the Kuma init container initContainer: # Image name. diff --git a/docs/generated/raw/kuma-cp.yaml b/docs/generated/raw/kuma-cp.yaml index 89e5d2555493..e48da89fbc2b 100644 --- a/docs/generated/raw/kuma-cp.yaml +++ b/docs/generated/raw/kuma-cp.yaml @@ -313,6 +313,9 @@ runtime: memory: 512Mi # ENV: KUMA_INJECTOR_SIDECAR_CONTAINER_RESOURCES_LIMITS_MEMORY # Additional environment variables that can be placed on Kuma DP sidecar envVars: {} # ENV: KUMA_RUNTIME_KUBERNETES_INJECTOR_SIDECAR_CONTAINER_ENV_VARS + # If true, it enables a postStart script that waits until Envoy is ready. + # With the current Kubernetes behavior, any other container in the Pod will wait until the script is complete. + waitForDataplaneReady: false # ENV: KUMA_RUNTIME_KUBERNETES_INJECTOR_SIDECAR_CONTAINER_WAIT_FOR_DATAPLANE_READY # InitContainer defines configuration of the Kuma init container initContainer: # Image name. diff --git a/pkg/config/app/kuma-cp/kuma-cp.defaults.yaml b/pkg/config/app/kuma-cp/kuma-cp.defaults.yaml index 89e5d2555493..e48da89fbc2b 100644 --- a/pkg/config/app/kuma-cp/kuma-cp.defaults.yaml +++ b/pkg/config/app/kuma-cp/kuma-cp.defaults.yaml @@ -313,6 +313,9 @@ runtime: memory: 512Mi # ENV: KUMA_INJECTOR_SIDECAR_CONTAINER_RESOURCES_LIMITS_MEMORY # Additional environment variables that can be placed on Kuma DP sidecar envVars: {} # ENV: KUMA_RUNTIME_KUBERNETES_INJECTOR_SIDECAR_CONTAINER_ENV_VARS + # If true, it enables a postStart script that waits until Envoy is ready. + # With the current Kubernetes behavior, any other container in the Pod will wait until the script is complete. + waitForDataplaneReady: false # ENV: KUMA_RUNTIME_KUBERNETES_INJECTOR_SIDECAR_CONTAINER_WAIT_FOR_DATAPLANE_READY # InitContainer defines configuration of the Kuma init container initContainer: # Image name. diff --git a/pkg/config/plugins/runtime/k8s/config.go b/pkg/config/plugins/runtime/k8s/config.go index 2694bb1584e3..3804827a23b6 100644 --- a/pkg/config/plugins/runtime/k8s/config.go +++ b/pkg/config/plugins/runtime/k8s/config.go @@ -253,7 +253,8 @@ type SidecarContainer struct { RedirectPortInboundV6 uint32 `json:"redirectPortInboundV6,omitempty" envconfig:"kuma_runtime_kubernetes_injector_sidecar_container_redirect_port_inbound_v6"` // Redirect port for outbound traffic. RedirectPortOutbound uint32 `json:"redirectPortOutbound,omitempty" envconfig:"kuma_runtime_kubernetes_injector_sidecar_container_redirect_port_outbound"` - // WaitForDataplaneReady enabled a script that waits until Envoy is ready + // WaitForDataplaneReady enables a script that waits until Envoy is ready. + // With the current Kubernetes behavior, any other container in the Pod will wait until the script is complete. WaitForDataplaneReady bool `json:"waitForDataplaneReady" envconfig:"kuma_runtime_kubernetes_injector_sidecar_container_wait_for_dataplane_ready"` }