Skip to content

Commit

Permalink
[kube-prometheus-stack] Implement POC basing on @jkroepke's 2nd sugge…
Browse files Browse the repository at this point in the history
…stion in #4818

#4818 (comment)
Signed-off-by: Johannes Schnatterer <johannes.schnatterer@cloudogu.com>
  • Loading branch information
schnatterer committed Aug 29, 2024
1 parent 739fe4c commit b83ccf1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
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: 62.4.0
version: 63.0.0
appVersion: v0.76.0
kubeVersion: ">=1.19.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
Expand Down
4 changes: 4 additions & 0 deletions charts/kube-prometheus-stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ _See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documen

A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions.

### From 62.x to 63.x

TODO

### From 61.x to 62.x

This version upgrades Prometheus-Operator to v0.76.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,8 @@ spec:
ruleSelector: {}
{{- end }}
{{- end }}
{{- if not (eq .Values.prometheus.prometheusSpec.scrapeConfigSelector nil)}}
scrapeConfigSelector:
{{- tpl (toYaml .Values.prometheus.prometheusSpec.scrapeConfigSelector | indent 4) . | nindent 2 }}
{{- if not (kindIs "invalid" .Values.prometheus.prometheusSpec.scrapeConfigSelector) }}
scrapeConfigSelector: {{ tpl (toYaml .Values.prometheus.prometheusSpec.scrapeConfigSelector) . | nindent 4 }}
{{- end }}
{{- if .Values.prometheus.prometheusSpec.storageSpec }}
storage:
Expand Down
11 changes: 4 additions & 7 deletions charts/kube-prometheus-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3683,14 +3683,11 @@ prometheus:
# matchLabels:
# prometheus: somelabel

## If true, a nil or {} value for prometheus.prometheusSpec.scrapeConfigSelector will cause the
## prometheus resource to be created with selectors based on values in the helm deployment,
## which will also match the scrapeConfigs created
##
scrapeConfigSelectorNilUsesHelmValues: true

## scrapeConfigs to be selected for target discovery.
## If {}, select all scrapeConfigs
## If matchLabels.release: "{{ $.Release.Name }}" the prometheus resource will be created
## with selectors based on values in the helm deployment, which will also match the scrapeConfigs created
## If matchLabels: null" select all scrapeConfigs
## If null, exclude the field from the prometheusSpec (keeping downward compatibility with older versions of CRD)
##
scrapeConfigSelector:
matchLabels:
Expand Down

0 comments on commit b83ccf1

Please sign in to comment.