Skip to content

Commit

Permalink
Upgrade prometheus
Browse files Browse the repository at this point in the history
This allows avoiding errors with skipCrds:

failed to create typed patch object (..): .spec.scrapeConfigNamespaceSelector: field not declared in schema

due to preinstalled legacy CRDs.

To do so, set the following via features.monitoring.values:

prometheus:
  prometheusSpec:
    scrapeConfigNamespaceSelector: null
    scrapeConfigSelectorNilUsesHelmValues: null
    scrapeConfigSelector: null

See also
prometheus-community/helm-charts#4906
  • Loading branch information
schnatterer committed Nov 21, 2024
1 parent 1799e6b commit cea3795
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,25 +271,21 @@ prometheus:
runAsUser: null
</#if>
# Find podMonitors, serviceMonitor, etc. in all namespaces
podMonitorNamespaceSelector:
serviceMonitorNamespaceSelector:
matchLabels: {}
probeNamespaceSelector:
# With this, we don't need the label "release: kube-prometheus-stack" on the service monitor
serviceMonitorSelectorNilUsesHelmValues: false
podMonitorNamespaceSelector:
matchLabels: {}
podMonitorSelectorNilUsesHelmValues: false
ruleNamespaceSelector:
matchLabels: {}
serviceMonitorNamespaceSelector:
ruleSelectorNilUsesHelmValues: false
scrapeConfigSelectorNilUsesHelmValues: false
probeNamespaceSelector:
matchLabels: {}
# With this, we don't need the label "release: kube-prometheus-stack" on the service monitor
podMonitorSelector:
matchLabels: null
probeSelector:
matchLabels: null
ruleSelector:
matchLabels: null
scrapeConfigSelector:
matchLabels: null
serviceMonitorSelector:
matchLabels: null
probeSelectorNilUsesHelmValues: false

<#if podResources == true>
resources:
limits:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ class ApplicationConfigurator {
helm : [
chart : 'kube-prometheus-stack',
/* When changing the chart, note that Argo CD also applies the CRDs from GitHub. */
repoURL: 'https://schnatterer.github.io/prom-helm-charts',
repoURL: 'https://prometheus-community.github.io/helm-charts',
/* When updating this make sure to also test if air-gapped mode still works */
version: '63.0.0',
version: '66.2.1',
grafanaImage: '',
grafanaSidecarImage: '',
prometheusImage: '',
Expand Down

0 comments on commit cea3795

Please sign in to comment.