-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
ScrapeConfig not applied when deployed via CRD #6363
Comments
Not familiar with how helm values are set, did you look at prometheus log as well? |
@slashpai not sure how to understand you question
are the logs of the prometheus-operator - so we know that
This is not the first time this is flaky, several people have been reporting it and it 'magically' has been 'working' out of a sudden. e.g #6189 |
I was asking if any issues reported on Prometheus pod? |
I cannot see any errors nor warnings
Just wiped the entire namespace/deployment and installed it again and the scrape config is now part of the targets. I deployed that CRD together with the entire helm chart, so it was there at the very beginning. As expected, adding another CRD after the helm deployment, just the same thing, just a different name/ip and it does not show up. Could it be that those CRDs are later transformed into config maps and the actual deployment struggles since configMap changes do not trigger re-deployments of the pods? Maye the typical shasum "workarround" like https://github.com/EugenMayer/helm-charts/blob/main/charts/rundeck/templates/nginx-deployment.yaml#L30 is needed to ensure those CRDs are deployed properly. I see that those static scrape configs end up in the UPDATE waiting for some time (minutes) the new scrape config showed up (without me doing anything) - so there might be a time delay or something else? |
Tried to remove a CRD and it took like 2 minutes to be removed as a target. This is by no means an issue in itself - maybe it just needed to be added to the docs so people consider/know about that. After the removal, i added it again and it took about 2 minutes to show up. So it seems to work reliable, but delayed (which is not an issue). |
@mviswanathsai has found the root cause and offers to submit a PR 🥳 |
Is there an existing issue for this?
What happened?
Description
deploying a scrape config via a crd in the stack deployed via the
kube-prometheus-stack
chartWhile having the typical configs for the operator .
The scrape config does never show in in prometheus under
/targets
Reading the similar #6189 i deployed the operator with debug logs and in fact i can see that the ScrapeConfig CRD is picked up
Expected Result
The target/scrape config should be added to prom and show up under targets
Actual Result
Scrape config never shows up
Prometheus Operator Version
Kubernetes Version
Kubernetes Cluster Type
k3s
How did you deploy Prometheus-Operator?
helm chart:prometheus-community/kube-prometheus-stack
Manifests
prometheus-operator log output
level=debug ts=2024-03-03T15:44:58.818656387Z caller=resource_selector.go:768 component=prometheus-controller msg="selected ScrapeConfigs" scrapeConfig=kube-prometheus-stack/opnsense namespace=kube-prometheus-stack prometheus=kube-prometheus-stack-prometheus
Anything else?
No response
The text was updated successfully, but these errors were encountered: