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

Add others's status in hpa describe #59609

Merged
merged 1 commit into from Mar 27, 2018

Conversation

Projects
None yet
5 participants
@zhangxiaoyu-zidif
Member

zhangxiaoyu-zidif commented Feb 9, 2018

What this PR does / why we need it:
Add other status in HPA describe

  • rs
  • deployment

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Release note:

Add all kinds of resource objects' statuses in HPA description.

@k8s-ci-robot k8s-ci-robot added size/S and removed size/XS labels Feb 9, 2018

@zhangxiaoyu-zidif zhangxiaoyu-zidif changed the title from Add rs status in hpa describe to Add others's status in hpa describe Feb 9, 2018

@zhangxiaoyu-zidif

This comment has been minimized.

Member

zhangxiaoyu-zidif commented Feb 28, 2018

/assign @liggitt
could you take a look?

@ericchiang

This comment has been minimized.

Member

ericchiang commented Feb 28, 2018

Can you add a description of what this does? Why is it needed?

@zhangxiaoyu-zidif

This comment has been minimized.

Member

zhangxiaoyu-zidif commented Mar 5, 2018

@ericchiang
hi, I see The Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU utilization in https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ and the code only contains rc's description, I guess we may need add rs and deploy's description on HPA

@@ -2875,6 +2875,24 @@ func describeHorizontalPodAutoscaler(hpa *autoscaling.HorizontalPodAutoscaler, e
w.Write(LEVEL_0, "failed to check Replication Controller\n")
}
}
if strings.ToLower(hpa.Spec.ScaleTargetRef.Kind) == "replicaSet" {

This comment has been minimized.

@liggitt

liggitt Mar 5, 2018

Member

ToLower will never match "replicaSet"

We should not be adding hard coded scale targets to this function. If we want to use the generic scale client to fetch scale status, that would be better

w.Write(LEVEL_0, "failed to check ReplicaSet\n")
}
}
if strings.ToLower(hpa.Spec.ScaleTargetRef.Kind) == "deployment" {

This comment has been minimized.

@liggitt

liggitt Mar 5, 2018

Member

Same here. Don't add hardcoded scale targets. Replace the existing one with a call using the polymorphic scale client

This comment has been minimized.

@zhangxiaoyu-zidif

zhangxiaoyu-zidif Mar 21, 2018

Member

I find we can use subsource to show the current replicas and desired replicas, so I use it instead. =)

@zhangxiaoyu-zidif

This comment has been minimized.

Member

zhangxiaoyu-zidif commented Mar 22, 2018

/test pull-kubernetes-e2e-gce

@zhangxiaoyu-zidif

This comment has been minimized.

Member

zhangxiaoyu-zidif commented Mar 26, 2018

@liggitt PTAL

@liggitt

This comment has been minimized.

Member

liggitt commented Mar 26, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Mar 26, 2018

@k8s-ci-robot

This comment has been minimized.

Contributor

k8s-ci-robot commented Mar 26, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, zhangxiaoyu-zidif

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

@zhangxiaoyu-zidif

This comment has been minimized.

Member

zhangxiaoyu-zidif commented Mar 26, 2018

/test pull-kubernetes-e2e-gce

@k8s-merge-robot

This comment has been minimized.

Contributor

k8s-merge-robot commented Mar 27, 2018

Automatic merge from submit-queue (batch tested with PRs 61434, 61501, 59609, 61467, 61531). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-merge-robot k8s-merge-robot merged commit 99fb416 into kubernetes:master Mar 27, 2018

14 checks passed

Submit Queue Queued to run github e2e tests a second time.
Details
cla/linuxfoundation zhangxiaoyu-zidif authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce Job succeeded.
Details
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details

@zhangxiaoyu-zidif zhangxiaoyu-zidif deleted the zhangxiaoyu-zidif:add-rs-in-hpa-describe branch Mar 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment