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

Update kubectl in addon-manager to use HPA in autoscaling/v1 #41587

Merged
merged 1 commit into from
Feb 22, 2017

Conversation

MrHohn
Copy link
Member

@MrHohn MrHohn commented Feb 16, 2017

Addon-manager is broken since HPA objects were removed from extensions api group.

Came across the logs from the latest addon-manager on Jenkins:

INFO: == Entering periodical apply loop at 2017-02-16T17:33:37+0000 ==
error: error pruning namespaced object extensions/v1beta1, Kind=HorizontalPodAutoscaler: the server could not find the requested resource
WRN: == Failed to execute /usr/local/bin/kubectl  apply --namespace=kube-system -f /etc/kubernetes/addons     --prune=true -l kubernetes.io/cluster-service=true --recursive >/dev/null at 2017-02-16T17:33:38+0000. 2 tries remaining. ==
error: error pruning namespaced object extensions/v1beta1, Kind=HorizontalPodAutoscaler: the server could not find the requested resource
WRN: == Failed to execute /usr/local/bin/kubectl  apply --namespace=kube-system -f /etc/kubernetes/addons     --prune=true -l kubernetes.io/cluster-service=true --recursive >/dev/null at 2017-02-16T17:33:46+0000. 1 tries remaining. ==
error: error pruning namespaced object extensions/v1beta1, Kind=HorizontalPodAutoscaler: the server could not find the requested resource
WRN: == Failed to execute /usr/local/bin/kubectl  apply --namespace=kube-system -f /etc/kubernetes/addons     --prune=true -l kubernetes.io/cluster-service=true --recursive >/dev/null at 2017-02-16T17:33:53+0000. 0 tries remaining. ==
WRN: == Kubernetes addon update completed with errors at 2017-02-16T17:33:58+0000 ==

And notice this commit (f66679a) came in two weeks ago, which removed HorizontalPodAutoscaler from extensions/v1beta1.

Addon-manager is now partially functioning that it could successfully create and update addons, but will fail to prune objects, which means upgrade tests may mostly fail.

Pushed another version of addon-manager with kubectl v1.6.0-alpha.2 (release 2 days ago) for fixing, including below images:

  • gcr.io/google-containers/kube-addon-manager:v6.4-alpha.2
  • gcr.io/google-containers/kube-addon-manager-amd64:v6.4-alpha.2
  • gcr.io/google-containers/kube-addon-manager-arm:v6.4-alpha.2
  • gcr.io/google-containers/kube-addon-manager-arm64:v6.4-alpha.2
  • gcr.io/google-containers/kube-addon-manager-ppc64le:v6.4-alpha.2
  • gcr.io/google-containers/kube-addon-manager-s390x:v6.4-alpha.2

@mikedanese

cc @wojtek-t @shyamjvs

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 16, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-github-robot k8s-github-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. release-note-label-needed labels Feb 16, 2017
@jbeda jbeda added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-label-needed labels Feb 19, 2017
@jbeda
Copy link
Contributor

jbeda commented Feb 19, 2017

Don't know this super well, but looks reasonable.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 19, 2017
@@ -12,8 +12,7 @@ spec:
# When updating version also bump it in:
# - cluster/images/hyperkube/static-pods/addon-manager-singlenode.json
# - cluster/images/hyperkube/static-pods/addon-manager-multinode.json
# - cluster/gce/coreos/kube-manifests/kube-addon-manager.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

The path for kube-addon-manager.yaml was actually updated to

cluster/saltbase/salt/kube-addons/kube-addon-manager.yaml
test/kubemark/resources/manifests/kube-addon-manager.yaml

My personal thinking is that we can probably remove all of the comments here

    # When updating version also bump it in:
    # - cluster/images/hyperkube/static-pods/addon-manager-singlenode.json
    # - cluster/images/hyperkube/static-pods/addon-manager-multinode.json
    # - cluster/gce/coreos/kube-manifests/kube-addon-manager.yaml

As the comments is difficult to maintain and also I think that most developer can simply grep to get and replace all needed places.

Copy link
Member Author

Choose a reason for hiding this comment

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

@gyliu513 Removed the pointers in test/kubemark/resources/manifests/kube-addon-manager.yaml and updated the references in cluster/saltbase/salt/kube-addons/kube-addon-manager.yaml, which is expected to be the entry point when bumping up addon-manager.

Yeah these comments are messy, but it would be better to have it. At least people will know they may need to grep. I hope we will later have pre-submit checks to ensure files are in-synced (by putting specific lint comments in codes).

@jbeda Sorry for the change after lgtm...

Copy link
Contributor

Choose a reason for hiding this comment

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

fair enough, thanks.

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 20, 2017
@MrHohn
Copy link
Member Author

MrHohn commented Feb 20, 2017

@k8s-bot unit test this

@jbeda
Copy link
Contributor

jbeda commented Feb 20, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 20, 2017
@gmarek
Copy link
Contributor

gmarek commented Feb 21, 2017

/approve

1 similar comment
@roberthbailey
Copy link
Contributor

/approve

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

The following people have approved this PR: MrHohn, gmarek, roberthbailey

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 21, 2017
@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 41349, 41532, 41256, 41587, 41657)

@k8s-github-robot k8s-github-robot merged commit fe34705 into kubernetes:master Feb 22, 2017
@MrHohn MrHohn deleted the addon-manager-fix-hpa branch May 16, 2017 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. 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.

None yet

8 participants