Skip to content

Commit

Permalink
Make DD_SITE a common env var so it is passed to process-agent, syste…
Browse files Browse the repository at this point in the history
…m-probe, trace-agent
  • Loading branch information
mantoine96 authored and clamoriniere committed May 20, 2020
1 parent e856641 commit ed073f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions pkg/controller/datadogagent/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,6 @@ func defaultEnvVars() []corev1.EnvVar {
Name: "DD_CLUSTER_NAME",
Value: "",
},
{
Name: "DD_SITE",
Value: "",
},
{
Name: "DD_HEALTH_PORT",
Value: "5555",
Expand Down Expand Up @@ -208,6 +204,10 @@ func defaultEnvVars() []corev1.EnvVar {
Name: "DD_LOG_LEVEL",
Value: "INFO",
},
{
Name: "DD_SITE",
Value: "",
},
{
Name: "DD_KUBERNETES_KUBELET_HOST",
ValueFrom: &corev1.EnvVarSource{
Expand Down
8 changes: 4 additions & 4 deletions pkg/controller/datadogagent/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,10 @@ func getEnvVarsCommon(dda *datadoghqv1alpha1.DatadogAgent, needAPIKey bool) ([]c
Name: datadoghqv1alpha1.DDLogLevel,
Value: getLogLevel(dda),
},
{
Name: datadoghqv1alpha1.DDSite,
Value: dda.Spec.Site,
},
{
Name: datadoghqv1alpha1.DDKubeletHost,
ValueFrom: &corev1.EnvVarSource{
Expand Down Expand Up @@ -472,10 +476,6 @@ func getEnvVarsForAgent(dda *datadoghqv1alpha1.DatadogAgent) ([]corev1.EnvVar, e
Name: datadoghqv1alpha1.DDClusterName,
Value: spec.ClusterName,
},
{
Name: datadoghqv1alpha1.DDSite,
Value: spec.Site,
},
{
Name: datadoghqv1alpha1.DDHealthPort,
Value: strconv.Itoa(int(datadoghqv1alpha1.DefaultAgentHealthPort)),
Expand Down

0 comments on commit ed073f2

Please sign in to comment.