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

[kube-prometheus-stack] Thanos Ruler: Add alertDropLabels + additional config #4445

Merged
merged 3 commits into from
Apr 12, 2024
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
2 changes: 1 addition & 1 deletion charts/kube-prometheus-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 58.0.1
version: 58.1.0
appVersion: v0.73.0
kubeVersion: ">=1.19.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
Expand Down
18 changes: 14 additions & 4 deletions charts/kube-prometheus-stack/templates/thanos-ruler/ruler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ spec:
externalPrefix: "{{ tpl .Values.thanosRuler.thanosRulerSpec.externalPrefix . }}"
{{- else if and .Values.thanosRuler.ingress.enabled .Values.thanosRuler.ingress.hosts }}
externalPrefix: "http://{{ tpl (index .Values.thanosRuler.ingress.hosts 0) . }}{{ .Values.thanosRuler.thanosRulerSpec.routePrefix }}"
{{- else }}
externalPrefix: http://{{ template "kube-prometheus-stack.thanosRuler.name" . }}.{{ template "kube-prometheus-stack.namespace" . }}:{{ .Values.thanosRuler.service.port }}
{{- else if .Values.thanosRuler.thanosRulerSpec.externalPrefixNilUsesHelmValues }}
externalPrefix: "http://{{ template "kube-prometheus-stack.thanosRuler.name" . }}.{{ template "kube-prometheus-stack.namespace" . }}:{{ .Values.thanosRuler.service.port }}"
{{- end }}
{{- if .Values.thanosRuler.thanosRulerSpec.additionalArgs }}
additionalArgs:
{{ toYaml .Values.thanosRuler.thanosRulerSpec.additionalArgs | indent 4 }}
{{ tpl (toYaml .Values.thanosRuler.thanosRulerSpec.additionalArgs) $ | indent 4 }}
{{- end }}
{{- if .Values.thanosRuler.thanosRulerSpec.nodeSelector }}
nodeSelector:
Expand Down Expand Up @@ -123,7 +123,7 @@ spec:
{{- end }}
{{- if .Values.thanosRuler.thanosRulerSpec.labels }}
labels:
{{ toYaml .Values.thanosRuler.thanosRulerSpec.labels | indent 4 }}
{{ tpl (toYaml .Values.thanosRuler.thanosRulerSpec.labels) $ | indent 4 }}
{{- end }}
{{- if .Values.thanosRuler.thanosRulerSpec.podMetadata }}
podMetadata:
Expand Down Expand Up @@ -184,6 +184,16 @@ spec:
{{- if .Values.thanosRuler.thanosRulerSpec.volumeMounts }}
volumeMounts:
{{ toYaml .Values.thanosRuler.thanosRulerSpec.volumeMounts | indent 4 }}
{{- end }}
{{- if .Values.thanosRuler.thanosRulerSpec.alertDropLabels }}
alertDropLabels:
{{ toYaml .Values.thanosRuler.thanosRulerSpec.alertDropLabels | indent 4 }}
{{- end }}
portName: {{ .Values.thanosRuler.thanosRulerSpec.portName }}
{{- with .Values.thanosRuler.thanosRulerSpec.additionalConfig }}
{{- tpl (toYaml .) $ | nindent 2 }}
{{- end }}
{{- with .Values.thanosRuler.thanosRulerSpec.additionalConfigString }}
{{- tpl . $ | nindent 2 }}
{{- end }}
{{- end }}
15 changes: 15 additions & 0 deletions charts/kube-prometheus-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4431,6 +4431,10 @@ thanosRuler:
##
externalPrefix:

## If true, http://{{ template "kube-prometheus-stack.thanosRuler.name" . }}.{{ template "kube-prometheus-stack.namespace" . }}:{{ .Values.thanosRuler.service.port }}
## will be used as value for externalPrefix
externalPrefixNilUsesHelmValues: true

## The route prefix ThanosRuler registers HTTP handlers for. This is useful, if using ExternalURL and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true,
## but the server serves requests under a different route prefix. For example for use with kubectl proxy.
##
Expand All @@ -4453,6 +4457,10 @@ thanosRuler:
# access_key: ""
# secret_key: ""

## Labels by name to drop before sending to alertmanager
## Maps to the --alert.label-drop flag of thanos ruler.
alertDropLabels: []

## QueryEndpoints defines Thanos querier endpoints from which to query metrics.
## Maps to the --query flag of thanos ruler.
queryEndpoints: []
Expand Down Expand Up @@ -4593,6 +4601,13 @@ thanosRuler:
##
portName: "web"

## Additional configuration which is not covered by the properties above. (passed through tpl)
additionalConfig: {}

## Additional configuration which is not covered by the properties above.
## Useful, if you need advanced templating
additionalConfigString: ""

## ExtraSecret can be used to store various data in an extra secret
## (use it for example to store hashed basic auth credentials)
extraSecret:
Expand Down
Loading