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

Solidify UnavailableReplicas field for Deployments #41789

Closed
0xmichalis opened this issue Feb 21, 2017 · 8 comments
Closed

Solidify UnavailableReplicas field for Deployments #41789

0xmichalis opened this issue Feb 21, 2017 · 8 comments
Assignees
Labels
area/api Indicates an issue on api area. area/workload-api/deployment kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/documentation Categorizes issue or PR as related to documentation. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. sig/apps Categorizes an issue or PR as relevant to SIG Apps.
Milestone

Comments

@0xmichalis
Copy link
Contributor

// Total number of unavailable pods targeted by this deployment.
// +optional
UnavailableReplicas int32

// Total number of unavailable pods targeted by this deployment.
// +optional
UnavailableReplicas int32

This is assuming we count unavailable pods from all created pods targeted by a Deployment.
In the controller, we calculate unavailable replicas based on spec.replicas which also includes pods that haven't been created.

totalReplicas := deploymentutil.GetReplicaCountForReplicaSets(allRSs)
unavailableReplicas := totalReplicas - availableReplicas

We either need to fix the controller to use status.replicas instead of spec.replicas and in both cases update the godoc to explain better the intent of the field.
@kubernetes/sig-apps-api-reviews

@0xmichalis 0xmichalis added area/workload-api/deployment sig/apps Categorizes an issue or PR as relevant to SIG Apps. labels Feb 21, 2017
@0xmichalis 0xmichalis added this to the v1.6 milestone Feb 21, 2017
@0xmichalis 0xmichalis modified the milestones: v1.6, v1.7 Mar 2, 2017
@0xmichalis
Copy link
Contributor Author

Punting for 1.7 but I think this is just a api doc change. UnavailableReplicas is fine for meaning the unavailable replicas that either werent created or are simply not available yet, we just need to make this clearer in the api comment.

@wanghaoran1988
Copy link
Contributor

/cc

@0xmichalis 0xmichalis added the kind/documentation Categorizes issue or PR as related to documentation. label Jun 9, 2017
@janetkuo janetkuo added the area/api Indicates an issue on api area. label Jun 14, 2017
@janetkuo janetkuo modified the milestones: v1.8, v1.7 Jun 14, 2017
@janetkuo
Copy link
Member

Punting for 1.8

@wanghaoran1988
Copy link
Contributor

I am volunteered to take this if nobody start working on this

@0xmichalis
Copy link
Contributor Author

@wanghaoran1988 this is only a doc update - I am going to update the API comments during the 1.8 timeframe.

@wanghaoran1988
Copy link
Contributor

@Kargakis Cool, thanks for clarification.

@0xmichalis
Copy link
Contributor Author

/kind cleanup
/priority important-longterm

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Sep 1, 2017
@k8s-github-robot
Copy link

[MILESTONENOTIFIER] Milestone Labels Complete

@Kargakis

Issue label settings:

  • sig/apps: Issue will be escalated to these SIGs if needed.
  • priority/important-longterm: Escalate to the issue owners; move out of the milestone after 1 attempt.
  • kind/cleanup: Adding tests, refactoring, fixing old bugs.
Additional instructions available here

k8s-github-robot pushed a commit that referenced this issue Sep 2, 2017
Automatic merge from submit-queue (batch tested with PRs 51590, 48217, 51209, 51575, 48627)

api: clarify d.status.unavailableReplicas

Fixes #41789

@kubernetes/sig-apps-api-reviews
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Indicates an issue on api area. area/workload-api/deployment kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/documentation Categorizes issue or PR as related to documentation. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. sig/apps Categorizes an issue or PR as relevant to SIG Apps.
Projects
None yet
Development

No branches or pull requests

5 participants