Skip to content

Commit

Permalink
Disabled telemetry when deployed using local manifests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvenga committed May 31, 2022
1 parent f6463df commit 74885f6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions manifests/install/dev/overlays/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ spec:
env:
- name: CONTRAST_DEFAULT_REGISTRY
value: contrastdotnet.azurecr.io/agent-operator
- name: CONTRAST_AGENT_TELEMETRY_OPTOUT
value: "true"
3 changes: 3 additions & 0 deletions manifests/install/testing/overlays/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ spec:
containers:
- name: contrast-agent-operator
imagePullPolicy: Never
env:
- name: CONTRAST_AGENT_TELEMETRY_OPTOUT
value: "true"
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ public async Task When_injected_then_pod_should_have_standard_injection_environm
var container = result.Spec.Containers.Single();
container.Env.Should().Contain(x => x.Name == "CONTRAST_MOUNT_PATH").Which.Value.Should().Be("/contrast");
container.Env.Should().Contain(x => x.Name == "CONTRAST__API__URL").Which.Value.Should().Be("http://localhost/");
container.Env.Should().Contain(x => x.Name == "CONTRAST_CLUSTER_ID").Which.Value.Should().NotBeNull();

// Of course, this won't be here if telemetry is disabled.
//container.Env.Should().Contain(x => x.Name == "CONTRAST_CLUSTER_ID").Which.Value.Should().NotBeNull();

var apiKey = container.Env.Should().Contain(x => x.Name == "CONTRAST__API__API_KEY").Subject;
apiKey.ValueFrom.SecretKeyRef.Name.Should().Be("testing-agent-connection-secret");
Expand Down

0 comments on commit 74885f6

Please sign in to comment.