-
Notifications
You must be signed in to change notification settings - Fork 5k
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 #4906
Merged
jkroepke
merged 9 commits into
prometheus-community:main
from
schnatterer:feature/downward-compat-prom-crd-2
Oct 24, 2024
Merged
[kube-prometheus-stack] Add downward compat for Prom CRD #4906
jkroepke
merged 9 commits into
prometheus-community:main
from
schnatterer:feature/downward-compat-prom-crd-2
Oct 24, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
schnatterer
requested review from
andrewgkew,
gianrubio,
gkarthiks,
GMartinez-Sisti,
jkroepke,
QuentinBisson,
scottrigby and
Xtigyro
as code owners
October 9, 2024 16:04
jkroepke
reviewed
Oct 14, 2024
charts/kube-prometheus-stack/templates/prometheus/prometheus.yaml
Outdated
Show resolved
Hide resolved
… fields 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.scrapeConfigNamespaceSelector: field not declared in schema This patch provides a workaround using this values.yaml: prometheus: prometheusSpec: scrapeConfigNamespaceSelector: null scrapeConfigSelectorNilUsesHelmValues: null scrapeConfigSelector: null Signed-off-by: Johannes Schnatterer <[email protected]>
Signed-off-by: Johannes Schnatterer <[email protected]>
Signed-off-by: Johannes Schnatterer <[email protected]>
Signed-off-by: Johannes Schnatterer <[email protected]>
schnatterer
force-pushed
the
feature/downward-compat-prom-crd-2
branch
from
October 16, 2024 11:13
104aee9
to
cd1fcca
Compare
Signed-off-by: Johannes Schnatterer <[email protected]>
jkroepke
reviewed
Oct 16, 2024
Signed-off-by: Johannes Schnatterer <[email protected]>
Signed-off-by: Jan-Otto Kröpke <[email protected]>
Signed-off-by: Johannes Schnatterer <[email protected]>
jkroepke
approved these changes
Oct 23, 2024
@QuentinBisson please double check this, LGTM |
QuentinBisson
approved these changes
Oct 24, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as well
Thank you @jkroepke and @QuentinBisson for your support! |
schnatterer
added a commit
to cloudogu/gitops-playground
that referenced
this pull request
Nov 21, 2024
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
schnatterer
added a commit
to cloudogu/gitops-playground
that referenced
this pull request
Nov 21, 2024
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
schnatterer
added a commit
to cloudogu/gitops-playground
that referenced
this pull request
Nov 21, 2024
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
This PR provides a workaround using this values.yaml:
Yes, this is no ideal solution, but that seems to be what the enterprise-world requires 😐️
At runtime, the operator yields some warnings about the missing fields, but apparently everything else works.
Special notes for your reviewer
As discussed with @jkroepke I'm launching another try to include this feature 🙂
This is the same functionality as in #4818, which unfortunately was reverted in #4883, because it hit a bug in helm helm/helm#12879.
If we go for my original minimally invasive approach, there is no breaking change we won't cause #4878 again.
It won't work for sub charts (because of aforementioned bug in helm) but at least for direct users of kps chart.
Checklist
[prometheus-couchdb-exporter]
)