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: Make pod affinity templatable. #11453

Merged
merged 14 commits into from
Jun 14, 2024

Conversation

TheRealNoob
Copy link
Contributor

@TheRealNoob TheRealNoob commented Jun 12, 2024

What this PR does / why we need it:

allow templating pod affinity, useful when doing multiple releases. Less to manage in different values files. I included an example in the values.yaml file - I'd be just as happy to revert that example change if you'd prefer to keep that simple.

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

Which issue/s this PR fixes

None, but I can open if needed.

How Has This Been Tested?

I didn't add anything to the unittests, but I can if so desired.

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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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. labels Jun 12, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @TheRealNoob. 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 needs-priority size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 12, 2024
Copy link

netlify bot commented Jun 12, 2024

Deploy Preview for kubernetes-ingress-nginx canceled.

Name Link
🔨 Latest commit 0f27afd
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-ingress-nginx/deploys/666b1893dbf9f40008471b66

@k8s-ci-robot k8s-ci-robot added the area/helm Issues or PRs related to helm charts label Jun 12, 2024
@Gacko
Copy link
Member

Gacko commented Jun 12, 2024

/hold
/kind feature
/priority backlog

@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. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority labels Jun 12, 2024
@Gacko
Copy link
Member

Gacko commented Jun 12, 2024

/retitle Chart: Make pod affinity templatable.

@k8s-ci-robot k8s-ci-robot changed the title [helm] template pod affinity Chart: Make pod affinity templatable. Jun 12, 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.

Basically looks good so far. Please also implement unit tests and, if you want to go the extra mile, copy & adapt the documentation from controller.affinity to defaultBackend.affinity. Thank you!

charts/ingress-nginx/templates/controller-daemonset.yaml Outdated Show resolved Hide resolved
charts/ingress-nginx/templates/controller-deployment.yaml Outdated Show resolved Hide resolved
charts/ingress-nginx/values.yaml Outdated Show resolved Hide resolved
charts/ingress-nginx/values.yaml Outdated Show resolved Hide resolved
charts/ingress-nginx/values.yaml Outdated Show resolved Hide resolved
charts/ingress-nginx/values.yaml Outdated Show resolved Hide resolved
charts/ingress-nginx/Chart.yaml Outdated Show resolved Hide resolved
charts/ingress-nginx/README.md Outdated Show resolved Hide resolved
@Gacko
Copy link
Member

Gacko commented Jun 12, 2024

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 12, 2024
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 12, 2024
@TheRealNoob
Copy link
Contributor Author

@Gacko done

@TheRealNoob
Copy link
Contributor Author

@Gacko done

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.

One last small nit, really! 😬 Apart from that we should be ready to merge! Thanks a lot again for your contribution!

charts/ingress-nginx/values.yaml Outdated Show resolved Hide resolved
charts/ingress-nginx/values.yaml Outdated Show resolved Hide resolved
@TheRealNoob
Copy link
Contributor Author

ah great catch! Fixed on the unittests as well. Should be ready now 🙏

@Gacko
Copy link
Member

Gacko commented Jun 13, 2024

That was really the last round of suggestions. 😅

@TheRealNoob
Copy link
Contributor Author

done 🙏

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.

/lgtm

Thank you so much for your endurance! I know I can sometimes be a bit picky with the details, but it's absolutely worth it! Great work!

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Gacko, TheRealNoob

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 14, 2024
@Gacko
Copy link
Member

Gacko commented Jun 14, 2024

/unhold

@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 Jun 14, 2024
@k8s-ci-robot k8s-ci-robot merged commit af9e524 into kubernetes:main Jun 14, 2024
18 checks passed
@TheRealNoob TheRealNoob deleted the template_affinity branch June 14, 2024 14:09
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. 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. 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/L Denotes a PR that changes 100-499 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