Skip to content

Commit

Permalink
Add HOST_IP environment variable to consul_dataplane_sidecar.go
Browse files Browse the repository at this point in the history
This environment variable must be set in order to utilize HOST_IP as part of statsd or dogstatsd sinks. If this variable is unset and the sink is configured to use HOST_IP, the sidecar won't start and pods won't coe up healthy.
  • Loading branch information
woz5999 authored Apr 16, 2024
1 parent 8ac97bf commit 6982b65
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ func (w *MeshWebhook) consulDataplaneSidecar(namespace corev1.Namespace, pod cor
FieldRef: &corev1.ObjectFieldSelector{FieldPath: "metadata.uid"},
},
},
{
Name: "HOST_IP",
ValueFrom: &corev1.EnvVarSource{
FieldRef: &corev1.ObjectFieldSelector{FieldPath: "status.hostIP"},
},
},
{
Name: "DP_CREDENTIAL_LOGIN_META",
Value: "pod=$(POD_NAMESPACE)/$(POD_NAME)",
Expand Down

0 comments on commit 6982b65

Please sign in to comment.