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

fix: shared probe should not be removed if there are other services u… #5042

Merged
merged 1 commit into from Dec 13, 2023

Conversation

nilo19
Copy link
Contributor

@nilo19 nilo19 commented Nov 22, 2023

…sing it when deleting a service

What type of PR is this?

/kind bug

What this PR does / why we need it:

We remove the health probe related to the service when we delete the service, and this includes removing the shared health probe. But the shared probe should not be removed if there are other services using it. This PR checks if there are other services referencing the shared probe before removing it.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

fix: shared probe should not be removed if there are other services using it when deleting a service

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 22, 2023
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 22, 2023
@nilo19 nilo19 force-pushed the fix/probe branch 2 times, most recently from 16c5d32 to b466c99 Compare November 22, 2023 13:59
@nilo19
Copy link
Contributor Author

nilo19 commented Nov 23, 2023

/retest

@@ -197,3 +203,144 @@ func TestFindProbe(t *testing.T) {
})
}
}

func TestShouldKeepSharedProbe(t *testing.T) {
Copy link
Member

@feiskyer feiskyer Nov 23, 2023

Choose a reason for hiding this comment

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

Thanks adding the unit tests. Since this is an important feature fix, could you also add an e2e test case?

Copy link
Contributor Author

@nilo19 nilo19 Nov 23, 2023

Choose a reason for hiding this comment

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

We need to create a new prowjob for this feature because we need to modify the azure.json. So need to merge this fix first.

Copy link
Member

@feiskyer feiskyer left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: feiskyer, nilo19

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 merged commit f1ce7de into kubernetes-sigs:master Dec 13, 2023
17 checks passed
@nilo19 nilo19 deleted the fix/probe branch December 13, 2023 06:35
nilo19 added a commit that referenced this pull request Jan 9, 2024
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants