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

Do not delete PrometheusRule when using tools like Pulumi to manage the Helm chart #8902

Merged
merged 1 commit into from Feb 27, 2024

Conversation

Bazze
Copy link
Contributor

@Bazze Bazze commented Aug 3, 2022

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

  • 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.
  • I've read the CONTRIBUTION guide
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 3, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 3, 2022
@k8s-ci-robot
Copy link
Contributor

@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.

@k8s-ci-robot
Copy link
Contributor

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. 😃

@k8s-ci-robot
Copy link
Contributor

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.

@k8s-ci-robot k8s-ci-robot added needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 3, 2022
@k8s-ci-robot k8s-ci-robot added area/helm Issues or PRs related to helm charts cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 3, 2022
@longwuyuan
Copy link
Contributor

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

@Bazze
Copy link
Contributor Author

Bazze commented Aug 4, 2022

@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.

@longwuyuan
Copy link
Contributor

understood.

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 4, 2022
@k8s-triage-robot
Copy link

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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 2, 2022
@matanbaruch
Copy link

Can this be merged?

@rikatz
Copy link
Contributor

rikatz commented Jan 17, 2023

@longwuyuan should this be merged?

@rikatz
Copy link
Contributor

rikatz commented Jun 5, 2023

@longwuyuan can you check this one please? :)

@longwuyuan
Copy link
Contributor

longwuyuan commented Jun 5, 2023

@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

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 5, 2023
@longwuyuan
Copy link
Contributor

longwuyuan commented Jun 5, 2023

@Bazze 2 tests are skipped. Kindly check if you need to rebase.

@longwuyuan
Copy link
Contributor

/lifecycle active

@k8s-ci-robot k8s-ci-robot added lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 5, 2023
As fixed in pull request kubernetes#7829 for the ServiceMonitor resource, this is also needed for the PrometheusRule. 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. This PR should fix that.
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 5, 2023
@Bazze
Copy link
Contributor Author

Bazze commented Jun 5, 2023

@Bazze 2 tests are skipped. Kindly check if you need to rebase.

Rebase done ✅

@longwuyuan
Copy link
Contributor

/lgtm

cc @rikatz, I think this is ready

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 5, 2023
Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

/hold for @rikatz

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 5, 2023
@k8s-ci-robot
Copy link
Contributor

[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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 5, 2023
@matanbaruch
Copy link

matanbaruch commented Sep 18, 2023

Bump :)
Please merge

@rikatz
Copy link
Contributor

rikatz commented Feb 27, 2024

/hold cancel
Thanks

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 27, 2024
@k8s-ci-robot k8s-ci-robot merged commit bb6d1b7 into kubernetes:main Feb 27, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/helm Issues or PRs related to helm charts cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants