-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
cleanup package registered
and install
#18925
cleanup package registered
and install
#18925
Conversation
Labelling this PR as size/L |
489eb9c
to
e67fe84
Compare
GCE e2e build/test failed for commit 489eb9c678f62c957fb27c2772054105ff7c3a3c. |
GCE e2e test build/test passed for commit e67fe849a91e3b9afb381609c78c8c75c2aac88b. |
GCE e2e test build/test passed for commit f1fb4675f9d19c63bf1e6a9e86aa48d203c50bbd. |
f1fb467
to
9b98872
Compare
GCE e2e test build/test passed for commit 9b98872d6a8e749f7d2d0dc77b8d59e40c54528b. |
GCE e2e test build/test passed for commit 7799c19a413cf99a5b28efa6f9d79bef035f22d1. |
// IsEnvReuqestedVersion returns if the version is requested via the | ||
// KUBE_API_VERSIONS environment variable. If the environment variable is empty, | ||
// then it always returns true. | ||
func IsEnvReuqestedVersion(v unversioned.GroupVersion) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IsEnvExcludedVersion
to make the "no env set" case be more expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I'm afraid that will lead people to think the versions listed in the Env are the excluded versions. I think explain the "no env set" case in the comment is clearer.
I like this direction a lot. I think making the distinction between |
7799c19
to
eb801a8
Compare
// IsEnvReuqestedVersion returns if the version is requested via the | ||
// KUBE_API_VERSIONS environment variable. If the environment variable is empty, | ||
// then it always returns true. | ||
func IsEnvReuqestedVersion(v unversioned.GroupVersion) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I'm afraid that will lead people to think the versions listed in the Env are the excluded versions. I think explain the "no env set" case in the comment is clearer.
Ok, how about IsAllowedVersion
? Also, the name is currently typoed: Requested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change to IsAllowedVersion
. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
GCE e2e test build/test passed for commit eb801a83665f66bef78f981e9559f55461219932. |
@@ -99,14 +99,14 @@ kube-apiserver | |||
--service-node-port-range=: A port range to reserve for services with NodePort visibility. Example: '30000-32767'. Inclusive at both ends of the range. | |||
--ssh-keyfile="": If non-empty, use secure SSH proxy to the nodes, using this user keyfile | |||
--ssh-user="": If non-empty, use secure SSH proxy to the nodes, using this user name | |||
--storage-versions="componentconfig/v1alpha1,extensions/v1beta1,v1": The versions to store resources with. Different groups may be stored in different versions. Specified in the format "group1/version1,group2/version2...". This flag expects a complete list of storage versions of ALL groups registered in the server. It defaults to a list of preferred versions of all registered groups, which is derived from the KUBE_API_VERSIONS environment variable. | |||
--storage-versions="componentconfig/v1alpha1,extensions/v1beta1,metrics/v1alpha1,v1": The versions to store resources with. Different groups may be stored in different versions. Specified in the format "group1/version1,group2/version2...". This flag expects a complete list of storage versions of ALL groups registered in the server. It defaults to a list of preferred versions of all registered groups, which is derived from the KUBE_API_VERSIONS environment variable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This addition is caused by the apiserver's dependency on the client, so it will install all the versions listed in pkg/client/unversioned/import_known_versions.sh
.
I'm not sure why the metrics
group isn't there before. Having it in the list looks correct anyway.
GCE e2e test build/test passed for commit d8da3d65be25c435f388a6e3d02aa52877682a45. |
@@ -56,6 +54,15 @@ func init() { | |||
return | |||
} | |||
|
|||
registered.RegisterVersions(availableVersions...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be done first. You always want to register even if you have no external versions enabled. In this order, you might return before registering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
GCE e2e test build/test passed for commit 43b60c9f4d995d117dfed1c51f1eadcf4bccd2c6. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e test build/test passed for commit 43b60c9f4d995d117dfed1c51f1eadcf4bccd2c6. |
43b60c9
to
2b5b708
Compare
PR changed after LGTM, removing LGTM. |
Labelling this PR as size/XL |
GCE e2e test build/test passed for commit 2b5b708. |
3a2cede
to
ad484c7
Compare
Rebased and added a quite mechanical change to address caesarxuchao@43b60c9#commitcomment-15144868. Adding back the LGTM. |
GCE e2e test build/test passed for commit 3a2cede942e221d5b2fec5804f579e145d488cb7. |
GCE e2e test build/test passed for commit ad484c7. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e test build/test passed for commit ad484c7. |
@k8s-bot unit test this |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e test build/test passed for commit ad484c7. |
Automatic merge from submit-queue |
Auto commit by PR queue bot
…herry-pick-18919-to-release-3.9 [release-3.9] UPSTREAM: 60978: Fix use of "-w" flag to iptables-restore Origin-commit: a771ff97d4ba42233f34582aa6e14cb32a65fec9
fix #18531
Some highlights of the PR:
registered
, I remove the hard-coded list of valid versions and the hard-coded list of versions that are supported by defaultinstall
package in each group initiate the group installation process. It depends on theregistered
package to check if a version should be enabled and keep records of enabled groups. Theinit()
function in theregister
package in each version is changed to an exported function namedRegister()
, andinstall
will call it to add the version to theScheme
.import_known_versions.go
in each binary imports theinstall
package and calls a function exported by theregistered
package to check if all versions specified in KUBE_API_VERSIONS are installed.availableVersions
in eachinstall
package (https://github.com/kubernetes/kubernetes/blob/master/pkg/api/install/install.go#L42).Note this PR doesn't implement exactly what I wrote in #18531. Specifically this PR doesn't distinguishregistered versions
fromenabled versions
, because I find it's useless to have versions that are registered but not enabled.cc @nikhiljindal