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

add pdb to coredns #10557

Merged
merged 1 commit into from
Jan 16, 2024
Merged

Conversation

lobiyedKarim1
Copy link
Contributor

@lobiyedKarim1 lobiyedKarim1 commented Oct 25, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:
This PR introduces changes to enhance CoreDNS. The following modifications have been made:

  • Introduced the coredns_pod_disruption_budget variable to enable/disable PodDisruptionBudget for CoreDNS.
  • Set the default value of coredns_pod_disruption_budget to false.
  • Added the coredns_pod_disruption_budget_max_unavailable variable to specify the maximum number of unavailable pods during disruptions. The default value is set to 1.
  • Created a new template coredns-poddisruptionbudget.yml.j2 to generate the corresponding PodDisruptionBudget YAML file with configurable options.

These changes provide users with more control over CoreDNS's behavior during disruptions and enable fine-grained tuning of the PodDisruptionBudget settings.

Which issue(s) this PR fixes:
NONE

Special notes for your reviewer:
NONE

Does this PR introduce a user-facing change?:

Add pdb to coredns

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 25, 2023
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 25, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @lobiyedKarim1. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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 the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 25, 2023
@yankay yankay changed the title add pdb add pdb to coredns Oct 26, 2023
@yankay
Copy link
Member

yankay commented Oct 26, 2023

HI @lobiyedKarim1

Thanks to the PR.

The default config should not be changed :-)
Is it ok to use a variable to to config. like:
like the https://github.com/coredns/helm/blob/master/charts/coredns/templates/poddisruptionbudget.yaml

And the maxUnavailable can also be a variable.

/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 Oct 26, 2023
@VannTen
Copy link
Contributor

VannTen commented Oct 31, 2023

Does that really belong in Kubespray ? From #6400 I had the impression that one of the long-term goals was to somehow reduce the scope, and this looks like it could easily enough be in an standalone manifest applied after kubespray.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 28, 2023
@lobiyedKarim1 lobiyedKarim1 force-pushed the AddPdb branch 3 times, most recently from 29baaf8 to 2337a78 Compare November 29, 2023 08:43
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 29, 2023
@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 Dec 5, 2023
@lobiyedKarim1 lobiyedKarim1 force-pushed the AddPdb branch 2 times, most recently from 664002a to 5656a52 Compare December 8, 2023 17:17
Copy link
Contributor

@VannTen VannTen left a comment

Choose a reason for hiding this comment

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

By the way, you're only applying your pdb to the second instance of coredns (when using coredns_dual). It should be applied on both.

roles/kubernetes-apps/ansible/defaults/main.yml Outdated Show resolved Hide resolved
roles/kubernetes-apps/ansible/defaults/main.yml Outdated Show resolved Hide resolved
roles/kubernetes-apps/ansible/tasks/coredns.yml Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 15, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 11, 2024
@lobiyedKarim1
Copy link
Contributor Author

By the way, you're only applying your pdb to the second instance of coredns (when using coredns_dual). It should be applied on both.

@lobiyedKarim1
Copy link
Contributor Author

By the way, you're only applying your pdb to the second instance of coredns (when using coredns_dual). It should be applied on both.

Copy link
Contributor

@VannTen VannTen left a comment

Choose a reason for hiding this comment

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

I don't know if it's weird but it's already used in kubespray https://github.com/kubernetes-sigs/kubespray/blob/master/roles/network_plugin/cilium/tasks/install.yml#L63

Mmmh. I guess. Don't like that, but looks like there isn't a simpler way.

roles/kubernetes-apps/ansible/tasks/coredns.yml Outdated Show resolved Hide resolved
roles/kubernetes-apps/ansible/tasks/coredns.yml Outdated Show resolved Hide resolved
Copy link
Contributor

@VannTen VannTen left a comment

Choose a reason for hiding this comment

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

Last thing and we're good.

roles/kubernetes-apps/ansible/tasks/coredns.yml Outdated Show resolved Hide resolved
roles/kubernetes-apps/ansible/tasks/coredns.yml Outdated Show resolved Hide resolved
…ol disruption behavior and set maximum unavailable pods
@VannTen
Copy link
Contributor

VannTen commented Jan 15, 2024

/lgtm
Thanks (for putting up with me 👍 )
/assign @yankay @mzaian
(approval)

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

@mzaian mzaian left a comment

Choose a reason for hiding this comment

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

Thanks @lobiyedKarim1

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lobiyedKarim1, mzaian

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 Jan 16, 2024
@k8s-ci-robot k8s-ci-robot merged commit 7b7c9f5 into kubernetes-sigs:master Jan 16, 2024
65 checks passed
@yankay yankay mentioned this pull request Jan 19, 2024
pedro-peter pushed a commit to pedro-peter/kubespray that referenced this pull request May 8, 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/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants