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] Add downward compat for Prom CRD #5051

Conversation

schnatterer
Copy link
Contributor

What this PR does / why we need it

Running the latest prom-stack versions on legacy OpenShift clusters with no influence on the preinstalled CRDs results in errors such as this:

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

This PR provides a workaround using this values.yaml:

prometheus:
  prometheusSpec:
    automountServiceAccountToken: null

Yes, this is no ideal solution, but that seems to be what the enterprise-world requires 😐️

Special notes for your reviewer

This is the same as #4906 only for the new field
prometheus.prometheusSpec.automountServiceAccountToken that was introduced to the Prometheus CRD in 34b499c and then added to the chart in ff10663, which leads to the incompatibility.

@jkroepke Could I ask you again to review this?

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

… field

Running the latest prom-stack versions on legacy OpenShift clusters with no influence on the preinstalled CRDs results in errors such as this:

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

This patch provides a workaround using this values.yaml:

prometheus:
  prometheusSpec:
    automountServiceAccountToken: null

Signed-off-by: Johannes Schnatterer <johannes.schnatterer@cloudogu.com>
See prometheus-community#4976

Signed-off-by: Johannes Schnatterer <johannes.schnatterer@cloudogu.com>
Signed-off-by: Johannes Schnatterer <johannes.schnatterer@cloudogu.com>
Signed-off-by: Johannes Schnatterer <johannes.schnatterer@cloudogu.com>
@jkroepke
Copy link
Member

Seems like dashboards needs to be generated first.

Signed-off-by: Johannes Schnatterer <johannes.schnatterer@cloudogu.com>
Copy link
Member

@jkroepke jkroepke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jkroepke jkroepke merged commit 75bdfa0 into prometheus-community:main Dec 13, 2024
4 checks passed
@schnatterer
Copy link
Contributor Author

Thanks for fast-tracking my PR, @jkroepke ☺️

nihussmann added a commit to cloudogu/gitops-playground that referenced this pull request Jan 9, 2025
nihussmann added a commit to cloudogu/gitops-playground that referenced this pull request Jan 15, 2025
…eAccountToken null thanks to prometheus-community/helm-charts#5051

feat: removing securityContext in openshift.
Openshift will set it's own SCC constraints by this.
ThomasMichael1811 pushed a commit to cloudogu/gitops-playground that referenced this pull request Jan 15, 2025
…eAccountToken null thanks to prometheus-community/helm-charts#5051 (#256)

feat: removing securityContext in openshift.
Openshift will set it's own SCC constraints by this.
ThomasMichael1811 pushed a commit to cloudogu/gitops-playground that referenced this pull request Jan 15, 2025
…eAccountToken null thanks to prometheus-community/helm-charts#5051 (#256)

feat: removing securityContext in openshift.
Openshift will set it's own SCC constraints by this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants