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: Add topologySpreadConstraints for default backend. #11197

Conversation

msfidelis
Copy link
Contributor

What this PR does / why we need it:

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

fixes #11194

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 requested review from cpanato and Gacko April 4, 2024 10:10
@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. 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 Apr 4, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @msfidelis. 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-priority size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 4, 2024
Copy link

netlify bot commented Apr 4, 2024

Deploy Preview for kubernetes-ingress-nginx canceled.

Name Link
🔨 Latest commit adeb875
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-ingress-nginx/deploys/660fd3ac4dfa6500089d5a90

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 4, 2024
@Gacko
Copy link
Member

Gacko commented Apr 4, 2024

/assign

@Gacko
Copy link
Member

Gacko commented Apr 4, 2024

/kind feature
/priority backlog

@k8s-ci-robot k8s-ci-robot added 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 Apr 4, 2024
@Gacko
Copy link
Member

Gacko commented Apr 4, 2024

/retitle Chart: Add topologySpreadConstraints for default backend.

@k8s-ci-robot k8s-ci-robot changed the title DefaultBackend: topologySpreadConstraints Chart: Add topologySpreadConstraints for default backend. Apr 4, 2024
@Gacko
Copy link
Member

Gacko commented Apr 4, 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 Apr 4, 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.

I left a comment about where and how to add the new value. Also it would be nice to at least have some unit tests for that. I know, it does not exist for the controller either, but maybe you can add some for the both of them.

charts/ingress-nginx/values.yaml Outdated Show resolved Hide resolved
@Gacko
Copy link
Member

Gacko commented Apr 4, 2024

/label tide/merge-method-squash

@k8s-ci-robot k8s-ci-robot added tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 4, 2024
@Gacko
Copy link
Member

Gacko commented Apr 4, 2024

You forgot to re-generate the documentation. Also please move the values to the suggested place in the values.yaml. Thank you!

charts/ingress-nginx/values.yaml Outdated Show resolved Hide resolved
charts/ingress-nginx/values.yaml Outdated Show resolved Hide resolved
@msfidelis msfidelis force-pushed the feature/topology_spread_constraint_default_backend branch from d151996 to faf9e9f Compare April 4, 2024 22:45
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.

See my suggestion. I thought I already suggested that earlier. And still, please move the new value right below the affinity section. Thank you!

@@ -1075,6 +1075,26 @@ defaultBackend:
priorityClassName: ""
# -- Labels to be added to the default backend resources
labels: {}
# -- Topology spread constraints rely on node labels to identify the topology domain(s) that each Node is in.
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
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
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
# Ref.: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/

@msfidelis msfidelis force-pushed the feature/topology_spread_constraint_default_backend branch from faf9e9f to 5a81a66 Compare April 5, 2024 09:59
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 5, 2024
@msfidelis msfidelis force-pushed the feature/topology_spread_constraint_default_backend branch from 3842aef to 1366a3b Compare April 5, 2024 10:03
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.

Added some last suggestions. We are close to merging. ;)

@@ -998,6 +997,26 @@ defaultBackend:
# effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"

affinity: {}
# -- Topology spread constraints rely on node labels to identify the topology domain(s) that each Node is in.
# Ref.: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
#
Copy link
Member

Choose a reason for hiding this comment

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

You can safely omit this line. The way we are currently doing it for controller.topologySpreadConstraints isn't perfect, so don't relate to that.

@@ -998,6 +997,26 @@ defaultBackend:
# effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"

affinity: {}
# -- Topology spread constraints rely on node labels to identify the topology domain(s) that each Node is in.
# Ref.: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
#
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
#

# app.kubernetes.io/component: default-backend
# topologyKey: kubernetes.io/hostname
# maxSkew: 1
# whenUnsatisfiable: ScheduleAnyway
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
# whenUnsatisfiable: ScheduleAnyway
# whenUnsatisfiable: ScheduleAnyway

@@ -308,7 +308,6 @@ controller:
# topologyKey: kubernetes.io/hostname
# maxSkew: 1
# whenUnsatisfiable: ScheduleAnyway

Copy link
Member

Choose a reason for hiding this comment

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

Please keep that line.

@Gacko
Copy link
Member

Gacko commented Apr 5, 2024

Also, I will take care about the unit tests later. So no worries about that.

@msfidelis msfidelis force-pushed the feature/topology_spread_constraint_default_backend branch 2 times, most recently from 7d863d2 to 95d20aa Compare April 5, 2024 10:28
feature(default_backend): topologySpread support

feature(default_backend): topologySpread support

feature(default_backend): helm-docs

feature(default_backend): helm-docs

feature(default_backend): helm-docs

feature(default_backend): helm-docs

feature(default_backend): nit

feature(default_backend): nit

feature(default_backend): nit
@msfidelis msfidelis force-pushed the feature/topology_spread_constraint_default_backend branch from 95d20aa to adeb875 Compare April 5, 2024 10:34
@@ -308,7 +308,7 @@ controller:
# topologyKey: kubernetes.io/hostname
# maxSkew: 1
# whenUnsatisfiable: ScheduleAnyway

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for adding it back :) Seems you also added some trailing whitespaces, CI doesn't like them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for the troubles 😢

@Gacko
Copy link
Member

Gacko commented Apr 5, 2024

/ok-to-test
/lgtm

@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. lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 5, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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

Gacko commented Apr 5, 2024

Thanks a lot (again) for your contribution!

@k8s-ci-robot k8s-ci-robot merged commit e9509e2 into kubernetes:main Apr 5, 2024
18 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. 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. priority/backlog Higher priority than priority/awaiting-more-evidence. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. 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.

[helm chart] Include optional "topologySpreadConstraints" in defaultbackend
3 participants