Skip to content

Commit

Permalink
update server-statefulset.yaml to exclude prometheus.io/ annotations …
Browse files Browse the repository at this point in the history
…if/when enabling datadog openmetrics method for consul server metrics scrape. conflict present with http vs https that breaks openemtrics scrape on consul
  • Loading branch information
natemollica-nm committed Feb 9, 2024
1 parent a139223 commit 2d3f39b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion charts/consul/templates/server-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,17 @@ spec:
{{- tpl .Values.server.annotations . | nindent 8 }}
{{- end }}
{{- if (and .Values.global.metrics.enabled .Values.global.metrics.enableAgentMetrics) }}
{{- if not .Values.global.metrics.datadog.openMetricsPrometheus.enabled }}
"prometheus.io/scrape": "true"
"prometheus.io/path": "/v1/agent/metrics"
{{- if .Values.global.tls.enabled }}
{{- if and .Values.global.tls.enabled }}
"prometheus.io/port": "8501"
"prometheus.io/scheme": "https"
{{- else }}
"prometheus.io/port": "8500"
"prometheus.io/scheme": "http"
{{- end }}
{{- end }}
{{- if .Values.global.metrics.datadog.enabled }}
"ad.datadoghq.com/tolerate-unready": "true"
"ad.datadoghq.com/consul.logs": {{ .Values.global.metrics.datadog.dogstatsd.dogstatsdTags | toJson | replace "[" "[{" | replace "]" "}]" | replace ":" "\": \"" | join "\",\"" | squote }}
Expand Down

0 comments on commit 2d3f39b

Please sign in to comment.