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

explain Available condition behavior in deployment concepts #39892

Conversation

@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 tengqm 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 the language/en Issues or PRs related to English language label Mar 9, 2023
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 9, 2023
`type: Available` with `status: "True"` means that your Deployment is healthy and has a minimum availability (`.status.availableReplicas` is at least equal to `.spec.replicas - maxUnavailable`).
`maxUnavailable` is computed according to the deployment strategy:
- For the `RollingUpdate` strategy, it is a resolved value of `.spec.strategy.rollingUpdate.maxUnavailable`.
- For the `Recreate` strategy, it is always equal to 100% of the replicas that we allow to be down, so that new rollouts can proceed.
Copy link
Member Author

Choose a reason for hiding this comment

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

This counts with a change proposed in kubernetes/kubernetes#113228. Currently it is 0.

@netlify
Copy link

netlify bot commented Mar 9, 2023

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 12b5185
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/640a3eebf25323000954dc1f
😎 Deploy Preview https://deploy-preview-39892--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 settings.

The `Available` condition is designed to support rollouts first. If `maxUnavailable` is equal to `.spec.replicas`,
then this condition will never become `status: "False"`, even if no pods are running.
In this case you should check `.status.availableReplicas` to be sure that at least 1 pod is present.
It is recommended to have the number of `.spec.replicas` higher than `maxUnavailable`, to have always some pods available during a rollout.
Copy link
Contributor

Choose a reason for hiding this comment

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

Good description!

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks. I suppose we will wait with this PR until we are all satisfied with the changes in kubernetes/kubernetes#113228

@atiratree
Copy link
Member Author

@dims I think kubernetes/kubernetes#113228 if we want to change the Recreate strategy behaviour. I think it is not beneficial to publish documentation of something we will change.

@atiratree
Copy link
Member Author

Or we could publish the documentation without mentioning the Recreate strategy first, if needed. But would prefer to wait.

@smarterclayton
Copy link
Contributor

I would prefer to get the update to the strategy - I think we made the case in 113228 that we should be consistent and the current behavior provides no value for end users on recreate (they can only be wrong).

@kbhawkey
Copy link
Contributor

👋 @atiratree .
If you are waiting on code changes, should the PR be held until the changes are completed?

@atiratree
Copy link
Member Author

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 15, 2023
@kbhawkey
Copy link
Contributor

Hello @atiratree .
What's happening with these changes?

@atiratree
Copy link
Member Author

@smarterclayton would you have time to revisit kubernetes/kubernetes#113228? Or should I overtake it, or try to wrap this one first?

@divya-mohan0209
Copy link
Contributor

Hello @atiratree , please could you advise where we are with these changes?

1 similar comment
@divya-mohan0209
Copy link
Contributor

Hello @atiratree , please could you advise where we are with these changes?

@sftim
Copy link
Contributor

sftim commented Jan 3, 2024

There hasn't been an update in a long while.

I will close this PR.
@atiratree - your branch is still there, and you are welcome to make a new PR based on the work you have already done.

/close

@k8s-ci-robot
Copy link
Contributor

@sftim: Closed this PR.

In response to this:

There hasn't been an update in a long while.

I will close this PR.
@atiratree - your branch is still there, and you are welcome to make a new PR based on the work you have already done.

/close

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.

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. language/en Issues or PRs related to English language sig/docs Categorizes an issue or PR as relevant to SIG Docs. 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.

7 participants