diff --git a/.changelog/2205.txt b/.changelog/2205.txt new file mode 100644 index 0000000000..6a66970cfc --- /dev/null +++ b/.changelog/2205.txt @@ -0,0 +1,3 @@ +```release-note:improvement +cli: update cloud preset to enable telemetry collector +``` \ No newline at end of file diff --git a/charts/consul/values.yaml b/charts/consul/values.yaml index 85e82f0fd2..cf6a8e5ab4 100644 --- a/charts/consul/values.yaml +++ b/charts/consul/values.yaml @@ -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. diff --git a/cli/preset/cloud_preset.go b/cli/preset/cloud_preset.go index 5e5c6eccc2..732bad1b14 100644 --- a/cli/preset/cloud_preset.go +++ b/cli/preset/cloud_preset.go @@ -201,6 +201,8 @@ global: bootstrapToken: secretName: %s secretKey: %s + metrics: + enableTelemetryCollector: true cloud: enabled: true resourceId: @@ -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 @@ -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 diff --git a/cli/preset/cloud_preset_test.go b/cli/preset/cloud_preset_test.go index 5ade3146ca..770b47ba5c 100644 --- a/cli/preset/cloud_preset_test.go +++ b/cli/preset/cloud_preset_test.go @@ -483,6 +483,8 @@ global: gossipEncryption: secretKey: key secretName: consul-gossip-key + metrics: + enableTelemetryCollector: true tls: caCert: secretKey: tls.crt @@ -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: @@ -521,6 +532,8 @@ global: gossipEncryption: secretKey: key secretName: consul-gossip-key + metrics: + enableTelemetryCollector: true tls: caCert: secretKey: tls.crt @@ -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{}