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

Move internal types of hpa from pkg/apis/extensions to pkg/apis/autoscaling #25279

Merged
merged 3 commits into from
May 11, 2016

Conversation

piosz
Copy link
Member

@piosz piosz commented May 6, 2016

Changed all Kubernetes components to use HPA in version autoscaling/v1 instead of extensions/v1beta1.
HPA in version extensions/v1beta1 is deprecated now and will be removed in Kubernetes 1.4.

ref #21577

@lavalamp could you please review or delegate to someone from CSI team?
@janetkuo could you please take a look into the kubelet changes?

cc @fgrzadkowski @jszczepkowski @mwielgus @kubernetes/autoscaling

@piosz piosz added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. sig/autoscaling Categorizes an issue or PR as relevant to SIG Autoscaling. release-note-none Denotes a PR that doesn't merit a release note. labels May 6, 2016
@k8s-github-robot k8s-github-robot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/new-api size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels May 6, 2016
@piosz
Copy link
Member Author

piosz commented May 7, 2016

I'm doing something wrong or there is something broken with clientgen tool. I ran ./hack/update-all.sh and it didn't remove the following files:

pkg/client/typed/generated/extensions/unversioned/fake/fake_horizontalpodautoscaler.go
pkg/client/typed/generated/extensions/unversioned/horizontalpodautoscaler.go

I removed them manually and the scripts are still fine with the change.

cc @caesarxuchao

EDIT: before removing the files the build failed with:

+ godep go install ./...
# k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned
pkg/client/typed/generated/extensions/unversioned/horizontalpodautoscaler.go:35: undefined: extensions.HorizontalPodAutoscaler
...
# k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned/fake
pkg/client/typed/generated/extensions/unversioned/fake/fake_extensions_client.go:36: undefined: "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned".HorizontalPodAutoscalerInterface
...

@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 7, 2016
@wojtek-t
Copy link
Member

wojtek-t commented May 7, 2016

I think all our generators don't support "removing" case. Basically, we are looking at types for which we need to generate something and generate that. Same for verification. We are not looking at all what was previously generated and if we need to remove it now. I think that removing is such a rare case that there is not much sense in supporting it, since it won't be trivial.
@lavalamp for opinion also.

@piosz
Copy link
Member Author

piosz commented May 7, 2016

Thanks @wojtek-t for the explanation. IIUC I did exactly what is expected.

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 8, 2016
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 9, 2016
@caesarxuchao
Copy link
Member

Yeah, wojtek-t is right and you did it right.

@piosz
Copy link
Member Author

piosz commented May 10, 2016

friendly ping @lavalamp

@@ -32,7 +32,6 @@ var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1
func AddToScheme(scheme *runtime.Scheme) {
addKnownTypes(scheme)
addDefaultingFuncs(scheme)
addConversionFuncs(scheme)
Copy link
Member

Choose a reason for hiding this comment

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

why is this removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

I changed internal types to be identical with v1 so that conversions can be auto-generated and we don't have to have our own functions.

@lavalamp
Copy link
Member

LGTM sans one comment. Sorry, I thought I looked at this yesterday, guess not.

@piosz
Copy link
Member Author

piosz commented May 11, 2016

Thanks @lavalamp for the review.

@lavalamp lavalamp added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 11, 2016
@lavalamp
Copy link
Member

lgtm

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented May 11, 2016

GCE e2e build/test passed for commit d8af147.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit e0f7de9 into kubernetes:master May 11, 2016
@piosz piosz mentioned this pull request May 25, 2016
4 tasks
@piosz piosz deleted the hpa-ga branch June 7, 2016 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/autoscaling Categorizes an issue or PR as relevant to SIG Autoscaling. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants