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

Document topologySpreadConstraint duplicate value conflict handling #49962

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

Conversation

intUnderflow
Copy link
Member

@intUnderflow intUnderflow commented Feb 28, 2025

Description

TopologySpreadConstraints cannot conflict on a given (topologyKey, whenUnsatisfiable) pair, but this is currently not documented, this adds a note describing this behaviour.

You can see the limitation yourself by trying to create this deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      topologySpreadConstraints:
      - maxSkew: 1
        topologyKey: "kubernetes.io/hostname"
        whenUnsatisfiable: "DoNotSchedule"
        labelSelector:
          matchLabels:
            app: nginx
      - maxSkew: 3
        topologyKey: "kubernetes.io/hostname"
        whenUnsatisfiable: "DoNotSchedule"
        labelSelector:
          matchLabels:
            foo: bar
      containers:
      - name: nginx
        image: nginx:1.14.2
        ports:
        - containerPort: 80

The wording on this is a bit dense, so happy for suggestions on how to make it clearer.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 28, 2025
@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Feb 28, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign natalisucks for approval. For more information see the 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 the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 28, 2025
Copy link

netlify bot commented Feb 28, 2025

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 121fddd
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/67c1d3dad3e60c0008ae0f2e
😎 Deploy Preview https://deploy-preview-49962--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@intUnderflow
Copy link
Member Author

/sig docs

@k8s-ci-robot k8s-ci-robot added the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label Feb 28, 2025
@sftim
Copy link
Contributor

sftim commented Mar 3, 2025

/retitle Document topologySpreadConstraint duplicate value conflict handling

@k8s-ci-robot k8s-ci-robot changed the title Add information about topologySpeadConstraint duplicate values Document topologySpreadConstraint duplicate value conflict handling Mar 3, 2025
@sftim
Copy link
Contributor

sftim commented Mar 3, 2025

/priority backlog
/triage accepted

@k8s-ci-robot k8s-ci-robot added priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language priority/backlog Higher priority than priority/awaiting-more-evidence. sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/XS Denotes a PR that changes 0-9 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