diff --git a/.changelog/3383.txt b/.changelog/3383.txt index 4b69c26bfd..48d17a6876 100644 --- a/.changelog/3383.txt +++ b/.changelog/3383.txt @@ -1,15 +1,15 @@ ```release-note:feature breaking-change: users who previously had agent `enable_debug` set in `global.server.extraConfig`, should remove the extraConfig entry to avoid configuration conflicts. breaking-change: users who previously had agent `telemetry` stanza settings for `disable_hostname`, `enable_host_metrics`, `prefix_filter`, `dogstatsd_addr`, and/or `dogstatsd_tags`, should remove the extraConfig entry/entries to avoid configuration conflicts. -helm: introduces `global.metrics.datadogIntegration` overrides to streamline consul-k8s datadog integration. +helm: introduces `global.metrics.datadog` overrides to streamline consul-k8s datadog integration. helm: introduces `global.metrics.enableConsulAgentDebug` to expose agent [`enable_debug`](https://developer.hashicorp.com/consul/docs/agent/config/config-files#enable_debug) configuration. helm: introduces `global.metrics.disableAgentHostName` to expose agent [`telemetry.disable_hostname`](https://developer.hashicorp.com/consul/docs/agent/config/config-files#telemetry-disable_hostname) configuration. helm: introduces `global.metrics.enableHostMetrics` to expose agent [`telemetry.enable_host_metrics`](https://developer.hashicorp.com/consul/docs/agent/config/config-files#telemetry-enable_host_metrics) configuration. -helm: introduces `global.metrics.metricsPrefixFiltering` to expose agent [`telemetry.prefix_filter`](https://developer.hashicorp.com/consul/docs/agent/config/config-files#telemetry-prefix_filter) configuration. -helm: introduces `global.metrics.datadogIntegration.dogstatsd.dogstatsdAddr` to expose agent [`telemetry.dogstatsd_addr`](https://developer.hashicorp.com/consul/docs/agent/config/config-files#telemetry-dogstatsd_addr) configuration. -helm: introduces `global.metrics.datadogIntegration.dogstatsd.dogstatsdTags` to expose agent [`telemetry.dogstatsd_tags`](https://developer.hashicorp.com/consul/docs/agent/config/config-files#telemetry-dogstatsd_tags) configuration. +helm: introduces `global.metrics.prefixFilter` to expose agent [`telemetry.prefix_filter`](https://developer.hashicorp.com/consul/docs/agent/config/config-files#telemetry-prefix_filter) configuration. +helm: introduces `global.metrics.datadog.dogstatsd.dogstatsdAddr` to expose agent [`telemetry.dogstatsd_addr`](https://developer.hashicorp.com/consul/docs/agent/config/config-files#telemetry-dogstatsd_addr) configuration. +helm: introduces `global.metrics.datadog.dogstatsd.dogstatsdTags` to expose agent [`telemetry.dogstatsd_tags`](https://developer.hashicorp.com/consul/docs/agent/config/config-files#telemetry-dogstatsd_tags) configuration. helm: introduces required `ad.datadoghq.com/` annotations and `tags.datadoghq.com/` labels for integration with [Datadog Autodiscovery](https://docs.datadoghq.com/integrations/consul/?tab=containerized) and [Datadog Unified Service Tagging](https://docs.datadoghq.com/getting_started/tagging/unified_service_tagging/?tab=kubernetes#serverless-environment) for Consul. helm: introduces automated unix domain socket hostPath mounting for containerized integration with datadog within consul-server statefulset. -helm: introduces `global.metrics.datadogIntegration.datadogOpenTelemetryCollector` override options to allow OTLP metrics forwarding to Datadog Agent. +helm: introduces `global.metrics.datadog.datadogOpenTelemetryCollector` override options to allow OTLP metrics forwarding to Datadog Agent. control-plane: adds `server-acl-init` datadog agent token creation for datadog integration. ``` \ No newline at end of file diff --git a/charts/consul/templates/_helpers.tpl b/charts/consul/templates/_helpers.tpl index a1126985bf..da4d747e96 100644 --- a/charts/consul/templates/_helpers.tpl +++ b/charts/consul/templates/_helpers.tpl @@ -520,41 +520,83 @@ Usage: {{ template "consul.validateResourceAPIs" . }} {{- end }} {{- end }} +{{/* +Validation for Consul Metrics configuration: + +Fail if metrics.enabled=true and metrics.disableAgentHostName=true, but metrics.enableAgentMetrics=false + - metrics.enabled = true + - metrics.enableAgentMetrics = false + - metrics.disableAgentHostName = true + +Fail if metrics.enableAgentMetrics=true and metrics.disableAgentHostName=true, but metrics.enabled=false + - metrics.enabled = false + - metrics.enableAgentMetrics = true + - metrics.disableAgentHostName = true + +Fail if metrics.enabled=true and metrics.enableHostMetrics=true, but metrics.enableAgentMetrics=false + - metrics.enabled = true + - metrics.enableAgentMetrics = false + - metrics.enableHostMetrics = true + +Fail if metrics.enableAgentMetrics=true and metrics.enableHostMetrics=true, but metrics.enabled=false + - metrics.enabled = false + - metrics.enableAgentMetrics = true + - metrics.enableHostMetrics = true + +Usage: {{ template "consul.validateMetricsConfig" . }} + +*/}} + +{{- define "consul.validateMetricsConfig" -}} +{{- if and (not .Values.global.metrics.enableAgentMetrics) (and .Values.global.metrics.disableAgentHostName .Values.global.metrics.enabled )}} +{{fail "When enabling metrics (global.metrics.enabled) and disabling hostname emission from metrics (global.metrics.disableAgentHostName), global.metrics.enableAgentMetrics must be set to true"}} +{{- end }} +{{- if and (not .Values.global.metrics) (and .Values.global.metrics.disableAgentHostName .Values.global.metrics.enableAgentMetrics )}} +{{fail "When enabling Consul agent metrics (global.metrics.enableAgentMetrics) and disabling hostname emission from metrics (global.metrics.disableAgentHostName), global metrics enablement (global.metrics.enabled) must be set to true"}} +{{- end }} +{{- if and (not .Values.global.metrics.enableAgentMetrics) (and .Values.global.metrics.disableAgentHostName .Values.global.metrics.enabled )}} +{{fail "When disabling hostname emission from metrics (global.metrics.disableAgentHostName) and enabling global metrics (global.metrics.enabled), Consul agent metrics must be enabled(global.metrics.enableAgentMetrics=true)"}} +{{- end }} +{{- if and (not .Values.global.metrics.enabled) (and .Values.global.metrics.disableAgentHostName .Values.global.metrics.enableAgentMetrics)}} +{{fail "When enabling Consul agent metrics (global.metrics.enableAgentMetrics) and disabling hostname metrics emission (global.metrics.disableAgentHostName), global metrics must be enabled (global.metrics.enabled)."}} +{{- end }} +{{- end -}} + {{/* Validation for Consul Datadog Integration deployment: Fail if Datadog integration enabled and Consul server agent telemetry is not enabled. - - global.metrics.datadogIntegration.enabled=true + - global.metrics.datadog.enabled=true - global.metrics.enableAgentMetrics=false || global.metrics.enabled=false Fail if Consul OpenMetrics (Prometheus) and DogStatsD metrics are both enabled and configured. - - global.metrics.datadogIntegration.dogstatsd.enabled (scrapes `/v1/agent/metrics?format=prometheus` via the `use_prometheus_endpoint` option) - - global.metrics.datadogIntegration.openMetricsPrometheus.enabled (scrapes `/v1/agent/metrics?format=prometheus`) + - global.metrics.datadog.dogstatsd.enabled (scrapes `/v1/agent/metrics?format=prometheus` via the `use_prometheus_endpoint` option) + - global.metrics.datadog.openMetricsPrometheus.enabled (scrapes `/v1/agent/metrics?format=prometheus`) - see https://docs.datadoghq.com/integrations/consul/?tab=host#host for recommendation to not have both Fail if Datadog OTLP forwarding is enabled and Consul Telemetry Collection is not enabled. - - global.metrics.datadogIntegration.datadogOpenTelemetryCollector.enabled=true + - global.metrics.datadog.otlp.enabled=true - telemetryCollector.enabled=false Fail if Consul Open Telemetry collector forwarding protocol is not one of either "http" or "grpc" - - global.metrics.datadogIntegration.datadogOpenTelemetryCollector.protocol!="http" || global.metrics.datadogIntegration.datadogOpenTelemetryCollector.protocol!="grpc" + - global.metrics.datadog.otlp.protocol!="http" || global.metrics.datadog.otlp.protocol!="grpc" Usage: {{ template "consul.validateDatadogConfiguration" . }} */}} {{- define "consul.validateDatadogConfiguration" -}} -{{- if and .Values.global.metrics.datadogIntegration.enabled (or (not .Values.global.metrics.enableAgentMetrics) (not .Values.global.metrics.enabled) )}} +{{- if and .Values.global.metrics.datadog.enabled (or (not .Values.global.metrics.enableAgentMetrics) (not .Values.global.metrics.enabled) )}} {{fail "When enabling datadog metrics collection, the /v1/agent/metrics is required to be accessible, therefore global.metrics.enableAgentMetrics and global.metrics.enabled must be also be enabled."}} {{- end }} -{{- if and .Values.global.metrics.datadogIntegration.dogstatsd.enabled .Values.global.metrics.datadogIntegration.openMetricsPrometheus.enabled }} -{{fail "You must have one of DogStatsD (global.metrics.datadogIntegration.dogstatsd.enabled) or OpenMetrics (global.metrics.datadogIntegration.openMetricsPrometheus.enabled) enabled, not both as this is an unsupported configuration." }} +{{- if and .Values.global.metrics.datadog.dogstatsd.enabled .Values.global.metrics.datadog.openMetricsPrometheus.enabled }} +{{fail "You must have one of DogStatsD (global.metrics.datadog.dogstatsd.enabled) or OpenMetrics (global.metrics.datadog.openMetricsPrometheus.enabled) enabled, not both as this is an unsupported configuration." }} {{- end }} -{{- if and .Values.global.metrics.datadogIntegration.datadogOpenTelemetryCollector.enabled (not .Values.telemetryCollector.enabled) }} -{{fail "Cannot enable Datadog OTLP metrics collection (global.metrics.datadogIntegration.datadogOpenTelemetryCollector.enabled) without consul-telemetry-collector. Ensure Consul OTLP collection is enabled (telemetryCollector.enabled) and configured." }} +{{- if and .Values.global.metrics.datadog.otlp.enabled (not .Values.telemetryCollector.enabled) }} +{{fail "Cannot enable Datadog OTLP metrics collection (global.metrics.datadog.otlp.enabled) without consul-telemetry-collector. Ensure Consul OTLP collection is enabled (telemetryCollector.enabled) and configured." }} {{- end }} -{{- if and .Values.global.metrics.datadogIntegration.datadogOpenTelemetryCollector.enabled (or (eq (.Values.global.metrics.datadogIntegration.datadogOpenTelemetryCollector.protocol | trimAll "\"" | quote) "http") (eq (.Values.global.metrics.datadogIntegration.datadogOpenTelemetryCollector.protocol | trimAll "\"" | quote) "grpc")) }} -{{fail "Valid values for global.metrics.datadogIntegration.datadogOpenTelemetryCollector.protocol must be one of either \"http\" or \"grpc\"." }} +{{- if and .Values.global.metrics.datadog.otlp.enabled (or (eq (.Values.global.metrics.datadog.otlp.protocol | trimAll "\"" | quote) "http") (eq (.Values.global.metrics.datadog.otlp.protocol | trimAll "\"" | quote) "grpc")) }} +{{fail "Valid values for global.metrics.datadog.otlp.protocol must be one of either \"http\" or \"grpc\"." }} {{- end }} {{- end -}} @@ -569,18 +611,18 @@ Usage: {{ template "consul.dogstatsdAaddressInfo" . }} */}} {{- define "consul.dogstatsdAaddressInfo" -}} -{{- if (and .Values.global.metrics.datadogIntegration.enabled .Values.global.metrics.datadogIntegration.dogstatsd.enabled) }} - "dogstatsd_addr": "{{- if eq .Values.global.metrics.datadogIntegration.dogstatsd.socketTransportType "UDS" }}unix://{{ .Values.global.metrics.datadogIntegration.dogstatsd.dogstatsdAddr }}{{- else }}{{ .Values.global.metrics.datadogIntegration.dogstatsd.dogstatsdAddr | trimAll "\"" }}:{{ .Values.global.metrics.datadogIntegration.dogstatsd.dogstatsdPort | toString }}{{- end }}",{{- end }} +{{- if (and .Values.global.metrics.datadog.enabled .Values.global.metrics.datadog.dogstatsd.enabled) }} + "dogstatsd_addr": "{{- if eq .Values.global.metrics.datadog.dogstatsd.socketTransportType "UDS" }}unix://{{ .Values.global.metrics.datadog.dogstatsd.dogstatsdAddr }}{{- else }}{{ .Values.global.metrics.datadog.dogstatsd.dogstatsdAddr | trimAll "\"" }}:{{ .Values.global.metrics.datadog.dogstatsd.dogstatsdPort | toString }}{{- end }}",{{- end }} {{- end -}} {{/* Configures the metrics prefixing that's required to either allow or dissallow certaing RPC or gRPC server calls: -Usage: {{ template "consul.metricsPrefixFiltering" . }} +Usage: {{ template "consul.prefixFilter" . }} */}} -{{- define "consul.metricsPrefixFiltering" -}} -{{- $allowList := .Values.global.metrics.metricsPrefixFiltering.allowList }} -{{- $blockList := .Values.global.metrics.metricsPrefixFiltering.blockList }} +{{- define "consul.prefixFilter" -}} +{{- $allowList := .Values.global.metrics.prefixFilter.allowList }} +{{- $blockList := .Values.global.metrics.prefixFilter.blockList }} {{- if and (not (empty $allowList)) (not (empty $blockList)) }} "prefix_filter": [{{- range $index, $value := concat $allowList $blockList -}} "{{- if (has $value $allowList) }}{{ printf "+%s" ($value | trimAll "\"") }}{{- else }}{{ printf "-%s" ($value | trimAll "\"") }}{{- end }}"{{- if lt $index (sub (len (concat $allowList $blockList)) 1) -}},{{- end -}} diff --git a/charts/consul/templates/datadog-agent-role.yaml b/charts/consul/templates/datadog-agent-role.yaml index 51dbf10f0c..191e6433c6 100644 --- a/charts/consul/templates/datadog-agent-role.yaml +++ b/charts/consul/templates/datadog-agent-role.yaml @@ -1,8 +1,8 @@ -{{- if .Values.global.metrics.datadogIntegration.enabled }} +{{- if .Values.global.metrics.datadog.enabled }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: {{ template "consul.fullname" . }}-datadog-metrics-agent + name: {{ template "consul.fullname" . }}-datadog-metrics namespace: {{ .Release.Namespace }} labels: app: datadog @@ -15,7 +15,7 @@ rules: - apiGroups: ["policy"] resources: ["podsecuritypolicies"] resourceNames: - - {{ template "consul.fullname" . }}-datadog-metrics-agent + - {{ template "consul.fullname" . }}-datadog-metrics verbs: - use {{- end }} @@ -23,7 +23,7 @@ rules: - apiGroups: ["security.openshift.io"] resources: ["securitycontextconstraints"] resourceNames: - - {{ template "consul.fullname" . }}-datadog-metrics-agent + - {{ template "consul.fullname" . }}-datadog-metrics verbs: - use {{- end }} diff --git a/charts/consul/templates/datadog-agent-rolebinding.yaml b/charts/consul/templates/datadog-agent-rolebinding.yaml index d203581d0e..4c7ff80258 100644 --- a/charts/consul/templates/datadog-agent-rolebinding.yaml +++ b/charts/consul/templates/datadog-agent-rolebinding.yaml @@ -1,4 +1,4 @@ -{{- if .Values.global.metrics.datadogIntegration.enabled }} +{{- if .Values.global.metrics.datadog.enabled }} apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: @@ -17,6 +17,6 @@ subjects: namespace: datadog roleRef: kind: Role - name: {{ template "consul.fullname" . }}-datadog-metrics-agent + name: {{ template "consul.fullname" . }}-datadog-metrics apiGroup: "" {{- end }} \ No newline at end of file diff --git a/charts/consul/templates/server-acl-init-job.yaml b/charts/consul/templates/server-acl-init-job.yaml index 711d5f1f03..2e798a54d5 100644 --- a/charts/consul/templates/server-acl-init-job.yaml +++ b/charts/consul/templates/server-acl-init-job.yaml @@ -2,9 +2,6 @@ {{- if (and $serverEnabled .Values.externalServers.enabled) }}{{ fail "only one of server.enabled or externalServers.enabled can be set" }}{{ end -}} {{- if (or $serverEnabled .Values.externalServers.enabled) }} {{- if and .Values.global.acls.createReplicationToken (not .Values.global.acls.manageSystemACLs) }}{{ fail "if global.acls.createReplicationToken is true, global.acls.manageSystemACLs must be true" }}{{ end -}} -{{- if .Values.global.metrics.enableDatadogIntegration }} -{{- if and .Values.global.metrics.enableDatadogIntegration.createAgentToken (not .Values.global.acls.manageSystemACLs) }}{{ fail "if global.metrics.enableDatadogIntegration.createAgentToken is true, global.acls.manageSystemACLs must be true" }}{{ end -}} -{{- end }} {{- if .Values.global.bootstrapACLs }}{{ fail "global.bootstrapACLs was removed, use global.acls.manageSystemACLs instead" }}{{ end -}} {{- if .Values.global.acls.manageSystemACLs }} {{- if or (and .Values.global.acls.bootstrapToken.secretName (not .Values.global.acls.bootstrapToken.secretKey)) (and .Values.global.acls.bootstrapToken.secretKey (not .Values.global.acls.bootstrapToken.secretName))}}{{ fail "both global.acls.bootstrapToken.secretKey and global.acls.bootstrapToken.secretName must be set if one of them is provided" }}{{ end -}} @@ -276,7 +273,7 @@ spec: -create-enterprise-license-token=true \ {{- end }} - {{- if (and (not .Values.global.metrics.datadogIntegration.dogstatsd.enabled) .Values.global.metrics.datadogIntegration.enabled .Values.global.acls.manageSystemACLs) }} + {{- if (and (not .Values.global.metrics.datadog.dogstatsd.enabled) .Values.global.metrics.datadog.enabled .Values.global.acls.manageSystemACLs) }} -create-dd-agent-token=true \ {{- end }} diff --git a/charts/consul/templates/server-config-configmap.yaml b/charts/consul/templates/server-config-configmap.yaml index 1f0fbd13ed..8c74364a29 100644 --- a/charts/consul/templates/server-config-configmap.yaml +++ b/charts/consul/templates/server-config-configmap.yaml @@ -30,7 +30,7 @@ data: {{- if .Values.server.logLevel }} "log_level": "{{ .Values.server.logLevel | upper }}", {{- end }} - "enable_debug": {{ .Values.global.metrics.enableConsulAgentDebug }}, + "enable_debug": {{ .Values.server.enableAgentDebug }}, "domain": "{{ .Values.global.domain }}", "limits": { "request_limits": { @@ -194,10 +194,10 @@ data: { "telemetry": { "prometheus_retention_time": "{{ .Values.global.metrics.agentMetricsRetentionTime }}", - "disable_hostname": {{ .Values.global.metrics.disableAgentHostName }},{{ template "consul.metricsPrefixFiltering" . }} - "enable_host_metrics": {{ .Values.global.metrics.enableHostMetrics }}{{- if .Values.global.metrics.datadogIntegration.dogstatsd.enabled }},{{ template "consul.dogstatsdAaddressInfo" . }} - {{- if .Values.global.metrics.datadogIntegration.dogstatsd.enabled }} - "dogstatsd_tags": {{ .Values.global.metrics.datadogIntegration.dogstatsd.dogstatsdTags | toJson }} + "disable_hostname": {{ .Values.global.metrics.disableAgentHostName }},{{ template "consul.prefixFilter" . }} + "enable_host_metrics": {{ .Values.global.metrics.enableHostMetrics }}{{- if .Values.global.metrics.datadog.dogstatsd.enabled }},{{ template "consul.dogstatsdAaddressInfo" . }} + {{- if .Values.global.metrics.datadog.dogstatsd.enabled }} + "dogstatsd_tags": {{ .Values.global.metrics.datadog.dogstatsd.dogstatsdTags | toJson }} {{- end }} {{- end }} } diff --git a/charts/consul/templates/server-statefulset.yaml b/charts/consul/templates/server-statefulset.yaml index e4f04b5cfc..024c3b5924 100644 --- a/charts/consul/templates/server-statefulset.yaml +++ b/charts/consul/templates/server-statefulset.yaml @@ -19,6 +19,7 @@ {{- end -}} {{ template "consul.validateRequiredCloudSecretsExist" . }} {{ template "consul.validateCloudSecretKeys" . }} +{{ template "consul.validateMetricsConfig" . }} {{ template "consul.validateDatadogConfiguration" . }} # StatefulSet to run the actual Consul server cluster. apiVersion: apps/v1 @@ -63,7 +64,7 @@ spec: release: {{ .Release.Name }} component: server hasDNS: "true" - {{- if .Values.global.metrics.datadogIntegration.enabled }} + {{- if .Values.global.metrics.datadog.enabled }} "tags.datadoghq.com/version": {{ template "consul.versionInfo" . }} "tags.datadoghq.com/env": {{ template "consul.name" . }} "tags.datadoghq.com/service": "consul-server" @@ -139,10 +140,10 @@ spec: "prometheus.io/port": "8500" "prometheus.io/scheme": "http" {{- end }} - {{- if .Values.global.metrics.datadogIntegration.enabled }} + {{- if .Values.global.metrics.datadog.enabled }} "ad.datadoghq.com/tolerate-unready": "true" - "ad.datadoghq.com/consul.logs": {{ .Values.global.metrics.datadogIntegration.dogstatsd.dogstatsdTags | squote }} - {{- if .Values.global.metrics.datadogIntegration.openMetricsPrometheus.enabled }} + "ad.datadoghq.com/consul.logs": {{ .Values.global.metrics.datadog.dogstatsd.dogstatsdTags | squote }} + {{- if .Values.global.metrics.datadog.otlp.enabled }} "ad.datadoghq.com/consul.checks": | { "openmetrics": { @@ -168,7 +169,7 @@ spec: ] } } - {{- else if (not .Values.global.metrics.datadogIntegration.dogstatsd.enabled) }} + {{- else if (not .Values.global.metrics.datadog.dogstatsd.enabled) }} "ad.datadoghq.com/consul.checks": | { "consul": { @@ -285,7 +286,7 @@ spec: emptyDir: medium: "Memory" {{- end }} - {{- if and .Values.global.metrics.datadogIntegration.enabled .Values.global.metrics.datadogIntegration.dogstatsd.enabled (eq .Values.global.metrics.datadogIntegration.dogstatsd.socketTransportType "UDS" ) }} + {{- if and .Values.global.metrics.datadog.enabled .Values.global.metrics.datadog.dogstatsd.enabled (eq .Values.global.metrics.datadog.dogstatsd.socketTransportType "UDS" ) }} - name: dsdsocket hostPath: path: /var/run/datadog @@ -536,7 +537,7 @@ spec: mountPath: /consul/license readOnly: true {{- end }} - {{- if and .Values.global.metrics.datadogIntegration.enabled .Values.global.metrics.datadogIntegration.dogstatsd.enabled (eq .Values.global.metrics.datadogIntegration.dogstatsd.socketTransportType "UDS" ) }} + {{- if and .Values.global.metrics.datadog.enabled .Values.global.metrics.datadog.dogstatsd.enabled (eq .Values.global.metrics.datadog.dogstatsd.socketTransportType "UDS" ) }} - name: dsdsocket mountPath: /var/run/datadog readOnly: true diff --git a/charts/consul/templates/telemetry-collector-deployment.yaml b/charts/consul/templates/telemetry-collector-deployment.yaml index 850d58e93a..f7b6d7bd2e 100644 --- a/charts/consul/templates/telemetry-collector-deployment.yaml +++ b/charts/consul/templates/telemetry-collector-deployment.yaml @@ -248,15 +248,15 @@ spec: - name: SSL_CERT_DIR value: "/etc/ssl/certs:/trusted-cas" {{- end }} - {{- if .Values.global.metrics.datadogIntegration.datadogOpenTelemetryCollector.enabled }} + {{- if .Values.global.metrics.datadog.otlp.enabled }} - name: HOST_IP valueFrom: fieldRef: fieldPath: status.hostIP - {{- if eq (.Values.global.metrics.datadogIntegration.datadogOpenTelemetryCollector.protocol | lower ) "http" }} + {{- if eq (.Values.global.metrics.datadog.otlp.protocol | lower ) "http" }} - name: CO_OTEL_HTTP_ENDPOINT value: "http://$(HOST_IP):4318" - {{- else if eq (.Values.global.metrics.datadogIntegration.datadogOpenTelemetryCollector.protocol | lower) "grpc" }} + {{- else if eq (.Values.global.metrics.datadog.otlp.protocol | lower) "grpc" }} - name: CO_OTEL_HTTP_ENDPOINT value: "grpc://$(HOST_IP):4317" {{- end }} diff --git a/charts/consul/test/unit/server-acl-init-job.bats b/charts/consul/test/unit/server-acl-init-job.bats index 685c8bf0c3..99fc6b9a9e 100644 --- a/charts/consul/test/unit/server-acl-init-job.bats +++ b/charts/consul/test/unit/server-acl-init-job.bats @@ -2446,9 +2446,9 @@ load _helpers } #-------------------------------------------------------------------- -# global.metrics.datadogIntegration +# global.metrics.datadog -@test "serverACLInit/Job: -create-dd-agent-token not set when datadogIntegration=false and manageSystemACLs=true" { +@test "serverACLInit/Job: -create-dd-agent-token not set when datadog=false and manageSystemACLs=true" { cd `chart_dir` local command=$(helm template \ -s templates/server-acl-init-job.yaml \ @@ -2461,13 +2461,13 @@ load _helpers [ "${actual}" = "false" ] } -@test "serverACLInit/Job: -create-dd-agent-token set when global.metrics.datadogIntegration=true and global.acls.manageSystemACLs=true" { +@test "serverACLInit/Job: -create-dd-agent-token set when global.metrics.datadog=true and global.acls.manageSystemACLs=true" { cd `chart_dir` local command=$(helm template \ -s templates/server-acl-init-job.yaml \ --set 'global.metrics.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.datadogIntegration.enabled=true' \ + --set 'global.metrics.datadog.enabled=true' \ --set 'global.acls.manageSystemACLs=true' \ . | tee /dev/stderr | yq '.spec.template.spec.containers[0].command' | tee /dev/stderr) @@ -2477,14 +2477,14 @@ load _helpers [ "${actual}" = "true" ] } -@test "serverACLInit/Job: -create-dd-agent-token NOT set when global.metrics.datadogIntegration=true, global.metrics.datadogIntegration.dogstatsd.enabled=true, and global.acls.manageSystemACLs=true" { +@test "serverACLInit/Job: -create-dd-agent-token NOT set when global.metrics.datadog=true, global.metrics.datadog.dogstatsd.enabled=true, and global.acls.manageSystemACLs=true" { cd `chart_dir` local command=$(helm template \ -s templates/server-acl-init-job.yaml \ --set 'global.metrics.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.datadogIntegration.enabled=true' \ - --set 'global.metrics.datadogIntegration.dogstatsd.enabled=true' \ + --set 'global.metrics.datadog.enabled=true' \ + --set 'global.metrics.datadog.dogstatsd.enabled=true' \ --set 'global.acls.manageSystemACLs=true' \ . | tee /dev/stderr | yq '.spec.template.spec.containers[0].command' | tee /dev/stderr) diff --git a/charts/consul/test/unit/server-config-configmap.bats b/charts/consul/test/unit/server-config-configmap.bats index 14bce88a0f..2729ed20d2 100755 --- a/charts/consul/test/unit/server-config-configmap.bats +++ b/charts/consul/test/unit/server-config-configmap.bats @@ -1312,76 +1312,76 @@ load _helpers #-------------------------------------------------------------------- # Datadog Consul on Kubernetes Integration -@test "server/ConfigMap: when global.metrics.datadogIntegration.enabled=true, sets default telemetry.dogstatsd_addr config" { +@test "server/ConfigMap: when global.metrics.datadog.enabled=true, sets default telemetry.dogstatsd_addr config" { cd `chart_dir` local actual=$(helm template \ -s templates/server-config-configmap.yaml \ --set 'global.metrics.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.datadogIntegration.enabled=true' \ - --set 'global.metrics.datadogIntegration.dogstatsd.enabled=true' \ + --set 'global.metrics.datadog.enabled=true' \ + --set 'global.metrics.datadog.dogstatsd.enabled=true' \ . | tee /dev/stderr | yq -r '.data["telemetry-config.json"]' | jq -r .telemetry.dogstatsd_addr | tee /dev/stderr) [ "${actual}" = "unix:///var/run/datadog/dsd.socket" ] } -@test "server/ConfigMap: when global.metrics.datadogIntegration.enabled=true, sets non-default namespace telemetry.dogstatsd_addr config" { +@test "server/ConfigMap: when global.metrics.datadog.enabled=true, sets non-default namespace telemetry.dogstatsd_addr config" { cd `chart_dir` local actual=$(helm template \ -s templates/server-config-configmap.yaml \ --set 'global.metrics.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.datadogIntegration.enabled=true' \ - --set 'global.metrics.datadogIntegration.dogstatsd.enabled=true' \ - --set 'global.metrics.datadogIntegration.dogstatsd.socketTransportType="UDP"' \ - --set 'global.metrics.datadogIntegration.dogstatsd.dogstatsdAddr="127.0.0.1"' \ + --set 'global.metrics.datadog.enabled=true' \ + --set 'global.metrics.datadog.dogstatsd.enabled=true' \ + --set 'global.metrics.datadog.dogstatsd.socketTransportType="UDP"' \ + --set 'global.metrics.datadog.dogstatsd.dogstatsdAddr="127.0.0.1"' \ . | tee /dev/stderr | yq -r '.data["telemetry-config.json"]' | jq -r .telemetry.dogstatsd_addr | tee /dev/stderr) [ "${actual}" = "127.0.0.1:8125" ] } -@test "server/ConfigMap: when global.metrics.datadogIntegration.enabled=true, sets non-default namespace telemetry.dogstatsd_addr with non-default port config" { +@test "server/ConfigMap: when global.metrics.datadog.enabled=true, sets non-default namespace telemetry.dogstatsd_addr with non-default port config" { cd `chart_dir` local actual=$(helm template \ -s templates/server-config-configmap.yaml \ --set 'global.metrics.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.datadogIntegration.enabled=true' \ - --set 'global.metrics.datadogIntegration.dogstatsd.enabled=true' \ - --set 'global.metrics.datadogIntegration.dogstatsd.socketTransportType="UDP"' \ - --set 'global.metrics.datadogIntegration.dogstatsd.dogstatsdAddr="127.0.0.1"' \ - --set 'global.metrics.datadogIntegration.dogstatsd.dogstatsdPort=8000' \ + --set 'global.metrics.datadog.enabled=true' \ + --set 'global.metrics.datadog.dogstatsd.enabled=true' \ + --set 'global.metrics.datadog.dogstatsd.socketTransportType="UDP"' \ + --set 'global.metrics.datadog.dogstatsd.dogstatsdAddr="127.0.0.1"' \ + --set 'global.metrics.datadog.dogstatsd.dogstatsdPort=8000' \ . | tee /dev/stderr | yq -r '.data["telemetry-config.json"]' | jq -r .telemetry.dogstatsd_addr | tee /dev/stderr) [ "${actual}" = "127.0.0.1:8000" ] } -@test "server/ConfigMap: when global.metrics.datadogIntegration.enabled=true, sets default telemetry.dogstatsd_tags config" { +@test "server/ConfigMap: when global.metrics.datadog.enabled=true, sets default telemetry.dogstatsd_tags config" { cd `chart_dir` local actual=$(helm template \ -s templates/server-config-configmap.yaml \ --set 'global.metrics.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.datadogIntegration.enabled=true' \ - --set 'global.metrics.datadogIntegration.dogstatsd.enabled=true' \ + --set 'global.metrics.datadog.enabled=true' \ + --set 'global.metrics.datadog.dogstatsd.enabled=true' \ . | tee /dev/stderr | yq -r '.data["telemetry-config.json"]' | jq -r .telemetry.dogstatsd_tags | jq -r '[ .[] ]| join (" ")' | tee /dev/stderr) [ "${actual}" = "source:consul consul_service:consul-server" ] } -@test "server/ConfigMap: when global.metrics.enableDatadogIntegration.enabled=true, sets non-default telemetry.dogstatsd_tags config" { +@test "server/ConfigMap: when global.metrics.datadog.enabled=true, sets non-default telemetry.dogstatsd_tags config" { cd `chart_dir` local actual=$(helm template \ -s templates/server-config-configmap.yaml \ --set 'global.metrics.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.datadogIntegration.enabled=true' \ - --set 'global.metrics.datadogIntegration.dogstatsd.enabled=true' \ - --set 'global.metrics.datadogIntegration.dogstatsd.dogstatsdTags'='[\"source:consul-dataplane\"\,\"service:consul-server-connection-manager\"]' \ + --set 'global.metrics.datadog.enabled=true' \ + --set 'global.metrics.datadog.dogstatsd.enabled=true' \ + --set 'global.metrics.datadog.dogstatsd.dogstatsdTags'='[\"source:consul-dataplane\"\,\"service:consul-server-connection-manager\"]' \ . | tee /dev/stderr | yq -r '.data["telemetry-config.json"]' | jq -r .telemetry.dogstatsd_tags | jq -r '[ .[] ]| join (" ")' | tee /dev/stderr) @@ -1391,7 +1391,7 @@ load _helpers #-------------------------------------------------------------------- # Consul Agent Metrics Prefix Filtering -@test "server/ConfigMap: when global.metrics.metricsPrefixFiltering default, empty telemetry.prefix_filter string list" { +@test "server/ConfigMap: when global.metrics.prefixFilter default, empty telemetry.prefix_filter string list" { cd `chart_dir` local actual=$(helm template \ -s templates/server-config-configmap.yaml \ @@ -1403,40 +1403,40 @@ load _helpers [ "${actual}" = "" ] } -@test "server/ConfigMap: when global.metrics.metricsPrefixFiltering.allowList, sets correctly prepended telemetry.prefix_filter string list" { +@test "server/ConfigMap: when global.metrics.prefixFilter.allowList, sets correctly prepended telemetry.prefix_filter string list" { cd `chart_dir` local actual=$(helm template \ -s templates/server-config-configmap.yaml \ --set 'global.metrics.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.metricsPrefixFiltering.allowList'={'"consul.rpc.server.call"'\,'"consul.grpc.server.call"'} \ + --set 'global.metrics.prefixFilter.allowList'={'"consul.rpc.server.call"'\,'"consul.grpc.server.call"'} \ . | tee /dev/stderr | yq -r '.data["telemetry-config.json"]' | jq -r .telemetry.prefix_filter | jq -r '[ .[] ]| join (" ")' | tee /dev/stderr) [ "${actual}" = "+consul.rpc.server.call +consul.grpc.server.call" ] } -@test "server/ConfigMap: when global.metrics.metricsPrefixFiltering.blockList, sets correctly prepended telemetry.prefix_filter string list" { +@test "server/ConfigMap: when global.metrics.prefixFilter.blockList, sets correctly prepended telemetry.prefix_filter string list" { cd `chart_dir` local actual=$(helm template \ -s templates/server-config-configmap.yaml \ --set 'global.metrics.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.metricsPrefixFiltering.blockList'={'"consul.rpc.server.call"'\,'"consul.grpc.server.call"'} \ + --set 'global.metrics.prefixFilter.blockList'={'"consul.rpc.server.call"'\,'"consul.grpc.server.call"'} \ . | tee /dev/stderr | yq -r '.data["telemetry-config.json"]' | jq -r .telemetry.prefix_filter | jq -r '[ .[] ]| join (" ")' | tee /dev/stderr) [ "${actual}" = "-consul.rpc.server.call -consul.grpc.server.call" ] } -@test "server/ConfigMap: when global.metrics.metricsPrefixFiltering.blockList and allowList, sets correctly prepended telemetry.prefix_filter string list" { +@test "server/ConfigMap: when global.metrics.prefixFilter.blockList and allowList, sets correctly prepended telemetry.prefix_filter string list" { cd `chart_dir` local actual=$(helm template \ -s templates/server-config-configmap.yaml \ --set 'global.metrics.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.metricsPrefixFiltering.allowList'={'"consul.rpc.server.call"'\,'"consul.http.GET"'} \ - --set 'global.metrics.metricsPrefixFiltering.blockList'={'"consul.http"'\,'"consul.raft.apply"'} \ + --set 'global.metrics.prefixFilter.allowList'={'"consul.rpc.server.call"'\,'"consul.http.GET"'} \ + --set 'global.metrics.prefixFilter.blockList'={'"consul.http"'\,'"consul.raft.apply"'} \ . | tee /dev/stderr | yq -r '.data["telemetry-config.json"]' | jq -r .telemetry.prefix_filter | jq -r '[ .[] ]| join (" ")' | tee /dev/stderr) @@ -1446,7 +1446,7 @@ load _helpers #-------------------------------------------------------------------- # Consul Agent Debug (PPROF) -@test "server/ConfigMap: global.metrics.enableConsulAgentDebug default, sets default enable_debug = false in server agent config" { +@test "server/ConfigMap: global.server.enableAgentDebug default, sets default enable_debug = false in server agent config" { cd `chart_dir` local actual=$(helm template \ -s templates/server-config-configmap.yaml \ @@ -1456,11 +1456,11 @@ load _helpers [ "${actual}" = "false" ] } -@test "server/ConfigMap: when global.metrics.enableConsulAgentDebug=true, sets enable_debug = true in server agent config" { +@test "server/ConfigMap: when global.server.enableAgentDebug=true, sets enable_debug = true in server agent config" { cd `chart_dir` local actual=$(helm template \ -s templates/server-config-configmap.yaml \ - --set 'global.metrics.enableConsulAgentDebug=true' \ + --set 'server.enableAgentDebug=true' \ . | tee /dev/stderr | yq -r '.data["server.json"]' | jq -r .enable_debug | tee /dev/stderr) diff --git a/charts/consul/test/unit/server-statefulset.bats b/charts/consul/test/unit/server-statefulset.bats index c6d781cef3..dc63ecf13f 100755 --- a/charts/consul/test/unit/server-statefulset.bats +++ b/charts/consul/test/unit/server-statefulset.bats @@ -783,13 +783,13 @@ load _helpers [ "${actual}" = "https" ] } -@test "server/StatefulSet: when global.metrics.datadogIntegration.enabled=true, adds ad.datadoghq.com annotations" { +@test "server/StatefulSet: when global.metrics.datadog.enabled=true, adds ad.datadoghq.com annotations" { cd `chart_dir` local annotations=$(helm template \ -s templates/server-statefulset.yaml \ --set 'global.metrics.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.datadogIntegration.enabled=true' \ + --set 'global.metrics.datadog.enabled=true' \ . | tee /dev/stderr | yq -r '.spec.template.metadata.annotations' | tee /dev/stderr) @@ -825,14 +825,14 @@ load _helpers [ "${actual}" = "basic" ] } -@test "server/StatefulSet: when global.metrics.datadogIntegration.enabled=true and global.tls.enabled, adds tls altered ad.datadoghq.com annotations" { +@test "server/StatefulSet: when global.metrics.datadog.enabled=true and global.tls.enabled, adds tls altered ad.datadoghq.com annotations" { cd `chart_dir` local annotations=$(helm template \ -s templates/server-statefulset.yaml \ --set 'global.tls.enabled=true' \ --set 'global.metrics.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.datadogIntegration.enabled=true' \ + --set 'global.metrics.datadog.enabled=true' \ . | tee /dev/stderr | yq -r '.spec.template.metadata.annotations' | tee /dev/stderr) @@ -880,13 +880,13 @@ load _helpers [ "${actual}" = "basic" ] } -@test "server/StatefulSet: when global.metrics.datadogIntegration.enabled=true and global.acls.manageSystemACLs=true, adds ad.datadoghq.com annotations for datadog-agent-metrics-acl-token secret rendering" { +@test "server/StatefulSet: when global.metrics.datadog.enabled=true and global.acls.manageSystemACLs=true, adds ad.datadoghq.com annotations for datadog-agent-metrics-acl-token secret rendering" { cd `chart_dir` local annotations=$(helm template \ -s templates/server-statefulset.yaml \ --set 'global.metrics.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.datadogIntegration.enabled=true' \ + --set 'global.metrics.datadog.enabled=true' \ --set 'global.acls.manageSystemACLs=true' \ . | tee /dev/stderr | yq -r '.spec.template.metadata.annotations' | tee /dev/stderr) @@ -899,14 +899,15 @@ load _helpers [ "${actual}" = "ENC[k8s_secret@default/default-datadog-agent-metrics-acl-token/token]" ] } -@test "server/StatefulSet: when global.metrics.datadogIntegration.openMetricsPrometheus.enabled, applicable openmetrics annotation is set" { +@test "server/StatefulSet: when global.metrics.datadog.otlp.enabled, applicable openmetrics annotation is set" { cd `chart_dir` local annotations=$(helm template \ -s templates/server-statefulset.yaml \ --set 'global.metrics.enabled=true' \ + --set 'telemetryCollector.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.datadogIntegration.enabled=true' \ - --set 'global.metrics.datadogIntegration.openMetricsPrometheus.enabled=true' \ + --set 'global.metrics.datadog.enabled=true' \ + --set 'global.metrics.datadog.otlp.enabled=true' \ . | tee /dev/stderr | yq -r '.spec.template.metadata.annotations' | tee /dev/stderr) @@ -935,15 +936,16 @@ load _helpers } -@test "server/StatefulSet: when datadogIntegration.openMetricsPrometheus.enabled, applicable openmetrics annotation is set with tls url" { +@test "server/StatefulSet: when datadog.otlp.enabled, applicable openmetrics annotation is set with tls url" { cd `chart_dir` local annotations=$(helm template \ -s templates/server-statefulset.yaml \ --set 'global.metrics.enabled=true' \ --set 'global.tls.enabled=true' \ + --set 'telemetryCollector.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.datadogIntegration.enabled=true' \ - --set 'global.metrics.datadogIntegration.openMetricsPrometheus.enabled=true' \ + --set 'global.metrics.datadog.enabled=true' \ + --set 'global.metrics.datadog.otlp.enabled=true' \ . | tee /dev/stderr | yq -r '.spec.template.metadata.annotations' | tee /dev/stderr) @@ -983,15 +985,16 @@ load _helpers [ "${actual}" = ".*" ] } -@test "server/StatefulSet: when global.metrics.datadogIntegration.openMetricsPrometheus.enabled, applicable openmetrics annotation is set with acls.manageSystemACLs enabled" { +@test "server/StatefulSet: when global.metrics.datadog.otlp.enabled, applicable openmetrics annotation is set with acls.manageSystemACLs enabled" { cd `chart_dir` local annotations=$(helm template \ -s templates/server-statefulset.yaml \ --set 'global.metrics.enabled=true' \ + --set 'telemetryCollector.enabled=true' \ --set 'global.acls.manageSystemACLs=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.datadogIntegration.enabled=true' \ - --set 'global.metrics.datadogIntegration.openMetricsPrometheus.enabled=true' \ + --set 'global.metrics.datadog.enabled=true' \ + --set 'global.metrics.datadog.otlp.enabled=true' \ . | tee /dev/stderr | yq -r '.spec.template.metadata.annotations' | tee /dev/stderr) @@ -1021,14 +1024,15 @@ load _helpers } -@test "server/StatefulSet: datadog unified tagging labels get added when global.metrics.datadogIntegration.enabled=true" { +@test "server/StatefulSet: datadog unified tagging labels get added when global.metrics.datadog.enabled=true" { cd `chart_dir` local labels=$(helm template \ -s templates/server-statefulset.yaml \ --set 'global.image=hashicorp/consul-enterprise:1.17.0-ent' \ --set 'global.metrics.enabled=true' \ + --set 'telemetryCollector.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.datadogIntegration.enabled=true' \ + --set 'global.metrics.datadog.enabled=true' \ . | tee /dev/stderr | yq -r '.spec.template.metadata.labels' | tee /dev/stderr) diff --git a/charts/consul/test/unit/telemetry-collector-deployment.bats b/charts/consul/test/unit/telemetry-collector-deployment.bats index db0ae3052b..71f10d3934 100755 --- a/charts/consul/test/unit/telemetry-collector-deployment.bats +++ b/charts/consul/test/unit/telemetry-collector-deployment.bats @@ -1373,7 +1373,7 @@ MIICFjCCAZsCCQCdwLtdjbzlYzAKBggqhkjOPQQDAjB0MQswCQYDVQQGEwJDQTEL' \ } #-------------------------------------------------------------------- -# global.metrics.datadogIntegration.datadogOpenTelemetryCollector +# global.metrics.datadog.otlp @test "telemetryCollector/Deployment: DataDog OTLP Collector HTTP protocol verification" { cd `chart_dir` @@ -1383,9 +1383,9 @@ MIICFjCCAZsCCQCdwLtdjbzlYzAKBggqhkjOPQQDAjB0MQswCQYDVQQGEwJDQTEL' \ --set 'telemetryCollector.cloud.enabled=false' \ --set 'global.metrics.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.datadogIntegration.enabled=true' \ - --set 'global.metrics.datadogIntegration.datadogOpenTelemetryCollector.enabled=true' \ - --set 'global.metrics.datadogIntegration.datadogOpenTelemetryCollector.protocol'="http" \ + --set 'global.metrics.datadog.enabled=true' \ + --set 'global.metrics.datadog.otlp.enabled=true' \ + --set 'global.metrics.datadog.otlp.protocol'="http" \ . | tee /dev/stderr | yq -r '.spec.template.spec.containers[0].env' | tee /dev/stderr) @@ -1402,9 +1402,9 @@ MIICFjCCAZsCCQCdwLtdjbzlYzAKBggqhkjOPQQDAjB0MQswCQYDVQQGEwJDQTEL' \ --set 'telemetryCollector.cloud.enabled=false' \ --set 'global.metrics.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.datadogIntegration.enabled=true' \ - --set 'global.metrics.datadogIntegration.datadogOpenTelemetryCollector.enabled=true' \ - --set 'global.metrics.datadogIntegration.datadogOpenTelemetryCollector.protocol'="HTTP" \ + --set 'global.metrics.datadog.enabled=true' \ + --set 'global.metrics.datadog.otlp.enabled=true' \ + --set 'global.metrics.datadog.otlp.protocol'="HTTP" \ . | tee /dev/stderr | yq -r '.spec.template.spec.containers[0].env' | tee /dev/stderr) @@ -1421,9 +1421,9 @@ MIICFjCCAZsCCQCdwLtdjbzlYzAKBggqhkjOPQQDAjB0MQswCQYDVQQGEwJDQTEL' \ --set 'telemetryCollector.cloud.enabled=false' \ --set 'global.metrics.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.datadogIntegration.enabled=true' \ - --set 'global.metrics.datadogIntegration.datadogOpenTelemetryCollector.enabled=true' \ - --set 'global.metrics.datadogIntegration.datadogOpenTelemetryCollector.protocol'="grpc" \ + --set 'global.metrics.datadog.enabled=true' \ + --set 'global.metrics.datadog.otlp.enabled=true' \ + --set 'global.metrics.datadog.otlp.protocol'="grpc" \ . | tee /dev/stderr | yq -r '.spec.template.spec.containers[0].env' | tee /dev/stderr) @@ -1440,9 +1440,9 @@ MIICFjCCAZsCCQCdwLtdjbzlYzAKBggqhkjOPQQDAjB0MQswCQYDVQQGEwJDQTEL' \ --set 'telemetryCollector.cloud.enabled=false' \ --set 'global.metrics.enabled=true' \ --set 'global.metrics.enableAgentMetrics=true' \ - --set 'global.metrics.datadogIntegration.enabled=true' \ - --set 'global.metrics.datadogIntegration.datadogOpenTelemetryCollector.enabled=true' \ - --set 'global.metrics.datadogIntegration.datadogOpenTelemetryCollector.protocol'="gRPC" \ + --set 'global.metrics.datadog.enabled=true' \ + --set 'global.metrics.datadog.otlp.enabled=true' \ + --set 'global.metrics.datadog.otlp.protocol'="gRPC" \ . | tee /dev/stderr | yq -r '.spec.template.spec.containers[0].env' | tee /dev/stderr) diff --git a/charts/consul/values.yaml b/charts/consul/values.yaml index 2616bc967c..ececce1f96 100644 --- a/charts/consul/values.yaml +++ b/charts/consul/values.yaml @@ -618,18 +618,12 @@ global: # @type: boolean enableAgentMetrics: false - # When set to true, enables Consul to report additional debugging information, including runtime profiling (pprof) data. - # This setting is only required for clusters without ACL enabled. Sets `enable_debug` in server agent config to `true`. - # If you change this setting, you must restart the agent for the change to take effect. Default is false. - # @type: boolean - enableConsulAgentDebug: false - # Set to true to stop prepending the machine's hostname to gauge-type metrics. Default is false. # Only applicable if `global.metrics.enabled` and `global.metrics.AgentMetrics` is true. # @type: boolean disableAgentHostName: false - # Configures consul agent metrics. Only applicable if + # Configures consul agent underlying host metrics. Only applicable if # Only applicable if `global.metrics.enabled` and `global.metrics.AgentMetrics` is true. # @type: boolean enableHostMetrics: false @@ -660,7 +654,7 @@ global: # Blocking will take priority if the same prefix is listed multiple times. # # - allowList: - metricsPrefixFiltering: + prefixFilter: # @type: array allowList: [] # @type: array @@ -668,14 +662,14 @@ global: # Configures consul integration configurations for datadog on kubernetes. # Only applicable if `global.metrics.enabled` and `global.metrics.enableAgentMetrics` is true. - datadogIntegration: + datadog: # Enables datadog [Consul Autodiscovery Integration](https://docs.datadoghq.com/integrations/consul/?tab=containerized#metric-collection) # by configuring the required `ad.datadoghq.com/consul.checks` annotation. The following _Consul_ agent metrics/health statuses # are monitored by Datadog unless monitoring via OpenMetrics (Prometheus) or DogStatsD: # - Serf events and member flaps # - The Raft protocol # - DNS performance - # - API Endpoints Scraped: + # - API Endpoints scraped: # - `/v1/agent/metrics?format=prometheus` # - `/v1/agent/self` # - `/v1/status/leader` @@ -706,7 +700,7 @@ global: # @type: boolean enabled: false - datadogOpenTelemetryCollector: + otlp: # Enables forwarding of Consul's Telemetry Collector OTLP metrics for # ingestion by Datadog Agent. # @default: false @@ -786,7 +780,7 @@ global: # # @default: "default" # @type: string - datadogNamespace: "default" + namespace: "default" # The name (and tag) of the consul-dataplane Docker image used for the @@ -1068,6 +1062,12 @@ server: # by setting the `server.extraConfig` value or by applying [configuration entries](https://developer.hashicorp.com/consul/docs/connect/config-entries). connect: true + # When set to true, enables Consul to report additional debugging information, including runtime profiling (pprof) data. + # This setting is only required for clusters without ACL enabled. Sets `enable_debug` in server agent config to `true`. + # If you change this setting, you must restart the agent for the change to take effect. Default is false. + # @type: boolean + enableAgentDebug: false + serviceAccount: # This value defines additional annotations for the server service account. This should be formatted as a multi-line # string.