Skip to content

Commit

Permalink
switch to deploy mode env
Browse files Browse the repository at this point in the history
  • Loading branch information
captncraig committed Nov 15, 2023
1 parent a68210d commit c07120d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/operator/resources_pod_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ func generatePodTemplate(
},
// Allows the agent to identify this is an operator-created pod.
{
Name: "AGENT_OPERATOR",
Value: "1",
Name: "AGENT_DEPLOY_MODE",
Value: "operator",
},
}
envVars = append(envVars, opts.ExtraEnvVars...)
Expand Down
4 changes: 2 additions & 2 deletions pkg/operator/resources_pod_template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func Test_generatePodTemplate(t *testing.T) {

tmpl, _, err := generatePodTemplate(cfg, "agent", deploy, podTemplateOptions{})
require.NoError(t, err)
require.Equal(t, "1", tmpl.Spec.Containers[1].Env[1].Value)
require.Equal(t, "AGENT_OPERATOR", tmpl.Spec.Containers[1].Env[1].Name)
require.Equal(t, "operator", tmpl.Spec.Containers[1].Env[1].Value)
require.Equal(t, "AGENT_DEPLOY_MODE", tmpl.Spec.Containers[1].Env[1].Name)
})
}

0 comments on commit c07120d

Please sign in to comment.