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

Project status should include some pod information #2423

Merged
merged 2 commits into from
May 22, 2015

Conversation

smarterclayton
Copy link
Contributor

Including the desired state annotations for rolling update

@fabianofranz review please

func describeDeploymentPodSummary(deploy *kapi.ReplicationController, showEmpty bool) string {
actual, requested := deploy.Status.Replicas, deploy.Spec.Replicas
if actual == requested {
if actual == 0 {
Copy link
Member

Choose a reason for hiding this comment

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

switch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

----- Original Message -----

  • change := ""
  • if changing, ok := deployutil.DeploymentDesiredReplicas(deploy); ok {
  •   switch {
    
  •   case changing < deploy.Spec.Replicas:
    
  •       change = fmt.Sprintf(" reducing to %d", changing)
    
  •   case changing > deploy.Spec.Replicas:
    
  •       change = fmt.Sprintf(" growing to %d", changing)
    
  •   }
    
  • }
  • return fmt.Sprintf(" - %s%s", s, change)
    +}

+func describeDeploymentPodSummary(deploy *kapi.ReplicationController,
showEmpty bool) string {

  • actual, requested := deploy.Status.Replicas, deploy.Spec.Replicas
  • if actual == requested {
  •   if actual == 0 {
    

switch


Reply to this email directly or view it on GitHub:
https://github.com/openshift/origin/pull/2423/files#r30834784

@fabianofranz
Copy link
Member

I found the login around the strings concatenation and punctuation a little hard to follow, but I guess it's still better than a Go template. So make sure you have tests for all scenarios (showEmpty, empty reason, etc). Otherwise LGTM.

@fabianofranz
Copy link
Member

s/login/logic

@smarterclayton
Copy link
Contributor Author

[merge]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/2050/) (Image: devenv-fedora_1594)

@openshift-bot
Copy link
Contributor

Evaluated for origin up to 4f56890

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/2336/)

openshift-bot pushed a commit that referenced this pull request May 22, 2015
@openshift-bot openshift-bot merged commit 4ad65fd into openshift:master May 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants