ingress-nginx
ingress-nginx copied to clipboard
Do not delete PrometheusRule when using tools like Pulumi to manage the Helm chart
What this PR does / why we need it:
When upgrading the ingress-nginx chart in our environment (via Pulumi) from a really old version to the latest (4.2.0) we noticed it wanted to delete the PrometheusRule resource.
As fixed in pull request #7829 for the ServiceMonitor resource, this is also needed for the PrometheusRule.
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation only
Which issue/s this PR fixes
N/A
How Has This Been Tested?
N/A
Checklist:
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I've read the CONTRIBUTION guide
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: Bazze (c0258a90a3b7506c5c3d6f76d7eccec7713794e3)
@Bazze: This issue is currently awaiting triage.
If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted
label and provide further guidance.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Welcome @Bazze!
It looks like this is your first PR to kubernetes/ingress-nginx 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.
You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.
You can also check if kubernetes/ingress-nginx has its own contribution guidelines.
You may want to refer to our testing guide if you run into trouble with your tests not passing.
If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!
Thank you, and welcome to Kubernetes. :smiley:
Hi @Bazze. Thanks for your PR.
I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test
on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test
label.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Bazze
Once this PR has been reviewed and has the lgtm label, please assign cpanato for approval by writing /assign @cpanato
in a comment. For more information see:The Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
Any cane you can copy/paste 2 editions of the entire related state.
(1) One with the current chart as it is showing succinct kubectl describe ...
outputs of before and after installation from the released version
(2) Second set of copy/pastes showing the states before and after the installation from the branch of your fork
Not sure if it is too much ask but there is not enough information here for reviewers to look at and the project is not having enough resources to reproduce and check this change
@longwuyuan The change is really exactly the same as discussed in #7829. That PR concerns issues using Kustomize, while we are using Pulumi and observed the very same behaviour. The ServiceMonitor, which since that PR does not have this extra condition, is working perfectly fine but this PrometheusRule for some reason still has this condition in place.
I don't think I'll be able to provide the state comparisons you're asking for, to be honest not really sure exactly what you're asking for. (I mostly only interact with kubernetes via Pulumi 😬)
For now, as a workaround, we've just declared a custom resource in Pulumi that matches the name of the PrometheusRule that was created in the earlier version of the chart and map it with an alias to ensure it's not deleted.
understood.
/ok-to-test
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/stale
is applied - After 30d of inactivity since
lifecycle/stale
was applied,lifecycle/rotten
is applied - After 30d of inactivity since
lifecycle/rotten
was applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale
- Mark this issue or PR as rotten with
/lifecycle rotten
- Close this issue or PR with
/close
- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
Can this be merged?
@longwuyuan should this be merged?
@longwuyuan can you check this one please? :)
@matanbaruch @Bazze , thanks for the contribution.
Although the current does not explicitly delete the existing PrometheusRule, the code hints that its mostly a overwrite, in the context of a non-retention of existing rule. Ideally, we should test with helm's --reuse-values
flag but its not possible for me to run a whole pulumi stack.
But since the proposed change is just a if condition to check, a-la #7829, I think there is no negative impact in merging this change, since it benefits the corner case of Pulumi like use-case.
/lgtm
cc @rikatz my opinion is that there is no negative impact
@Bazze 2 tests are skipped. Kindly check if you need to rebase.
/lifecycle active
@Bazze 2 tests are skipped. Kindly check if you need to rebase.
Rebase done ✅
/lgtm
cc @rikatz, I think this is ready
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Bazze, cpanato, longwuyuan
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~charts/ingress-nginx/OWNERS~~ [cpanato]
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
Bump :) Please merge
/hold cancel Thanks