-
Notifications
You must be signed in to change notification settings - Fork 456
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
fix: delete tenant with prometheus's config been deleted #1773
Conversation
@jiuker if any steps for verification, can you please add here? |
@shtripat here the steps:
|
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. Verified following below steps
- Deployed a kind cluster
- Deployed prometheus operator
- Deployed minio opertaor with this branch build
- Created a tenant and verified the content of secret as
k get secrets/minio-prom-additional-scrape-config -oyaml | yq '.data."prometheus-additional.yaml"' | base64
. Shows the prometheus scrape job details - Deleted the tenant now
- Re-verified the secret again using
k get secrets/minio-prom-additional-scrape-config -oyaml | yq '.data."prometheus-additional.yaml"' | base64
. And it shows empty value
Can you describe a little bit more of why is it needed and when is it needed please? that will make easier to document in release notes @jiuker |
When someone delete the tenant with prometheus enable. It will left the prometheus-job without this pr. Prometheus will get a offline target to get data always. @pjuarezd |
allright!, I get it now, cc @feorlen |
@pjuarezd the bug here is that we leave a stale configuration in Prometheus operator even after tenant deletion, this causes the next attempt to create leads to stale information to be picked up. That ends up not talking to Prometheus. |
Wow. Yeah. We didn't compare them operator/pkg/controller/prometheus.go Lines 64 to 148 in 6701b4f
|
delete tenant with prometheus's config been deleted.
Now if tenant enable the prometheus. Config will be left if the tenant have been deleted.