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

Chart: Implement unhealthyPodEvictionPolicy. #11992

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chengjoey
Copy link
Contributor

@chengjoey chengjoey commented Sep 19, 2024

What this PR does / why we need it:

Implement controller.unhealthyPodEvictionPolicy for controller PodDisruptionBudget

feat #11983

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • CVE Report (Scanner found CVE and adding report)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation only

How Has This Been Tested?

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have added unit and/or e2e tests to cover my changes.
  • All new and existing tests passed.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 19, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: chengjoey
Once this PR has been reviewed and has the lgtm label, please assign ubergesundheit for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 area/helm Issues or PRs related to helm charts needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. 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 labels Sep 19, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @chengjoey. 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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 19, 2024
Copy link

netlify bot commented Sep 19, 2024

Deploy Preview for kubernetes-ingress-nginx canceled.

Name Link
🔨 Latest commit c20354e
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-ingress-nginx/deploys/66ebd25d7bd3d400080d85d9

@chengjoey chengjoey force-pushed the feat/chart-unhealthyPodEvictionPolicy branch from 382bbc3 to fed5a8e Compare September 19, 2024 05:54
@Gacko Gacko changed the title Chart: Implement controller.unhealthyPodEvictionPolicy for controller PodDisruptionBudget Chart: Add controller.unhealthyPodEvictionPolicy. Sep 19, 2024
@@ -17,5 +17,6 @@ spec:
{{- include "ingress-nginx.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: default-backend
minAvailable: {{ .Values.defaultBackend.minAvailable }}
unhealthyPodEvictionPolicy: IfHealthyBudget
Copy link
Member

Choose a reason for hiding this comment

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

Please do not hard-code this. It's fine to just also add a value for the default backend. Consider renaming your PR then. 🙂

@@ -71,3 +71,30 @@ tests:
asserts:
- hasDocuments:
count: 0

- it: should create a PodDisruptionBudget with `IfHealthyBudget` unhealthyPodEvictionPolicy
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- it: should create a PodDisruptionBudget with `IfHealthyBudget` unhealthyPodEvictionPolicy
- it: should create a PodDisruptionBudget with `unhealthyPodEvictionPolicy` if `controller.unhealthyPodEvictionPolicy` is set

Comment on lines 87 to 100

- it: should create a PodDisruptionBudget with `AlwaysAllow` unhealthyPodEvictionPolicy
set:
controller.replicaCount: 2
controller.unhealthyPodEvictionPolicy: AlwaysAllow
asserts:
- hasDocuments:
count: 1
- isKind:
of: PodDisruptionBudget
- equal:
path: spec.unhealthyPodEvictionPolicy
value: AlwaysAllow

Copy link
Member

Choose a reason for hiding this comment

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

This one is obsolete as it's just a different string value and we don't have any logic that's changing what you put into the value or changes the output depending on the value.

@Gacko
Copy link
Member

Gacko commented Sep 19, 2024

/triage accepted
/kind feature
/priority backlog
/hold

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. triage/accepted Indicates an issue or PR is ready to be actively worked on. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority labels Sep 19, 2024
@chengjoey chengjoey force-pushed the feat/chart-unhealthyPodEvictionPolicy branch from fed5a8e to d9e6f6c Compare September 19, 2024 07:08
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 19, 2024
@Gacko
Copy link
Member

Gacko commented Sep 19, 2024

Sorry, I think I wasn't clear on the default backend thingy. I hope it's fine for you if I implement it in your fork. 🙂

@Gacko Gacko force-pushed the feat/chart-unhealthyPodEvictionPolicy branch from d9e6f6c to c20354e Compare September 19, 2024 07:27
@Gacko Gacko changed the title Chart: Add controller.unhealthyPodEvictionPolicy. Chart: Implement unhealthyPodEvictionPolicy. Sep 19, 2024
Copy link
Member

@Gacko Gacko left a comment

Choose a reason for hiding this comment

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

Okay, I implemented everything for adding unhealthyPodEvictionPolicy for now. But as the current releases do not come with tests and docs for the default backend PDB at all, I'd first like to fix and cherry-pick this. Gimme a few minutes.

@chengjoey
Copy link
Contributor Author

Okay, I implemented everything for adding unhealthyPodEvictionPolicy for now. But as the current releases do not come with tests and docs for the default backend PDB at all, I'd first like to fix and cherry-pick this. Gimme a few minutes.

thanks for your help! @Gacko

@Gacko
Copy link
Member

Gacko commented Sep 19, 2024

Here we go: #11993. Do you mind giving a review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm Issues or PRs related to helm charts cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/feature Categorizes issue or PR as related to a new feature. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. priority/backlog Higher priority than priority/awaiting-more-evidence. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants