Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update cloud preset to enable telemetry collector #2205

Merged
merged 3 commits into from
May 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/2205.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
cli: update cloud preset to enable telemetry collector
```
2 changes: 1 addition & 1 deletion charts/consul/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ global:
# Configures the Helm chart’s components to forward envoy metrics for the Consul service mesh to the
# consul-telemetry-collector. This includes gateway metrics and sidecar metrics.
# @type: boolean
enableTelemetryCollector: true
enableTelemetryCollector: false

# The name (and tag) of the consul-dataplane Docker image used for the
# connect-injected sidecar proxies and mesh, terminating, and ingress gateways.
Expand Down
13 changes: 13 additions & 0 deletions cli/preset/cloud_preset.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ global:
bootstrapToken:
secretName: %s
secretKey: %s
metrics:
enableTelemetryCollector: true
cloud:
enabled: true
resourceId:
Expand All @@ -215,6 +217,15 @@ global:
%s
%s
%s
telemetryCollector:
enabled: true
cloud:
clientId:
secretName: %s
secretKey: %s
clientSecret:
secretName: %s
secretKey: %s
server:
replicas: %d
affinity: null
Expand All @@ -231,6 +242,8 @@ controller:
secretNameHCPClientID, secretKeyHCPClientID,
secretNameHCPClientSecret, secretKeyHCPClientSecret,
apiHostCfg, authURLCfg, scadaAddressCfg,
secretNameHCPClientID, secretKeyHCPClientID,
secretNameHCPClientSecret, secretKeyHCPClientSecret,
cfg.BootstrapResponse.Cluster.BootstrapExpect, secretNameServerCert)
valuesMap := config.ConvertToMap(values)
return valuesMap
Expand Down
22 changes: 22 additions & 0 deletions cli/preset/cloud_preset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,8 @@ global:
gossipEncryption:
secretKey: key
secretName: consul-gossip-key
metrics:
enableTelemetryCollector: true
tls:
caCert:
secretKey: tls.crt
Expand All @@ -494,6 +496,15 @@ server:
replicas: 3
serverCert:
secretName: consul-server-cert
telemetryCollector:
cloud:
clientId:
secretKey: client-id
secretName: consul-hcp-client-id
clientSecret:
secretKey: client-secret
secretName: consul-hcp-client-secret
enabled: true
`

const expectedWithoutOptional = `connectInject:
Expand Down Expand Up @@ -521,6 +532,8 @@ global:
gossipEncryption:
secretKey: key
secretName: consul-gossip-key
metrics:
enableTelemetryCollector: true
tls:
caCert:
secretKey: tls.crt
Expand All @@ -532,6 +545,15 @@ server:
replicas: 3
serverCert:
secretName: consul-server-cert
telemetryCollector:
cloud:
clientId:
secretKey: client-id
secretName: consul-hcp-client-id
clientSecret:
secretKey: client-secret
secretName: consul-hcp-client-secret
enabled: true
`

cloudPreset := &CloudPreset{}
Expand Down