09 Jan 2024 02:10 PM - edited 12 Jan 2024 10:23 AM
An Istio proxy sidecar needs time to start, which delays network connectivity for other containers in the pod. The OneAgent process in the containers needs to connect to the tenant at startup, to create a Dynatrace Service entity. The OneAgent does allow for this delay, but if connectivity is delayed long enough to exceed the timeout, the Dynatrace Service will be missing.
A solution is to enable the global config holdApplicationUntilProxyStarts flag:
istioctl install --set meshConfig.defaultConfig.holdApplicationUntilProxyStarts=true
or with annotation on a workload pod:
annotations:
proxy.istio.io/config: '{ "holdApplicationUntilProxyStarts": true }'
These settings result in the Istio proxy sidecar getting the following lifecycle postStart entry, and Kubernetes waits for it to be ready before starting the workload container(s).
lifecycle:
postStart:
exec:
command:
- pilot-agent
- wait
This ensures the container network is ready before the workload container is started, allowing the OneAgent to connect without issues.