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
Initial deprecation of kubeadm v1beta1 apis #83276
Conversation
/assign @rosti |
@@ -113,6 +115,7 @@ type ClusterConfiguration struct { | |||
ClusterName string `json:"clusterName,omitempty"` | |||
} | |||
|
|||
// DEPRECATED |
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 think we should add the message:
DEPRECATED - This group version of X is deprecated by apis/kubeadm/v1beta2/X.
to:
InitConfiguration
JoinConfiguration
ClusterConfiguration
but not have it for the other objects.
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.
+1 for what @neolit123 said
/kind cleanup |
in the release note:
please omit |
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.
Thanks @Klaven !
We also need to modify validateSupportedVersion
(can be found here) in the following ways:
- Remove the
allowDeprecated
param and consider it alwaysfalse
. - Add the v1beta1 version string to the (now empty) map of deprecated versions.
- Instead of returning an error, print a warning, that the version is deprecated and users need to use
kubeadm config migrate
to switch to latest.
@@ -113,6 +115,7 @@ type ClusterConfiguration struct { | |||
ClusterName string `json:"clusterName,omitempty"` | |||
} | |||
|
|||
// DEPRECATED |
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.
+1 for what @neolit123 said
@rosti I am not sure I agree with this. If I did it would let deprecated api be used with init and join. I split the function so that it only returned an error if not allowed, and if allowed it logs a warning. Now that I think about it... it really is not needed anyhow as when you are allowed to use it you are running migrate anyhow and the warning is just going to tell you the same. What do you think? |
@Klaven the idea is to have beta level APIs working out of the box. No matter if they are deprecated or not. Hence, we need to log a warning. |
ee3e065
to
beba0dc
Compare
/test pull-kubernetes-e2e-gce-device-plugin-gpu |
/retest |
@@ -72,7 +74,7 @@ func validateSupportedVersion(gv schema.GroupVersion, allowDeprecated bool) erro | |||
} | |||
|
|||
if _, present := deprecatedAPIVersions[gvString]; present && !allowDeprecated { | |||
return errors.Errorf("your configuration file uses a deprecated API spec: %q. Please use 'kubeadm config migrate --old-config old.yaml --new-config new.yaml', which will write the new, similar spec using a newer API version.", gv.String()) | |||
klog.Errorf("your configuration file uses a deprecated API spec: %q. Please use 'kubeadm config migrate --old-config old.yaml --new-config new.yaml', which will write the new, similar spec using a newer API version.", gv.String()) |
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.
s/Errorf/Warningf
Furthermore, no need to call gv.String()
, just pass gv
, .String()
will be called under the hood.
Another thing, can you change the release note to something like this?
|
/test pull-kubernetes-kubemark-e2e-gce-big |
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.
Thanks @Klaven!
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Klaven, rosti 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 |
/retest Review the full test history for this PR. Silence the bot with an |
2 similar comments
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This PR deprecates the v1beta1 apies in kubeadm in favor of the v1beta2 apis.
Which issue(s) this PR fixes:
Fixes #
There is no issue filed, was discussed in 18th September 2019 kubeadm office hours when version 1.17 was planned.
Special notes for your reviewer:
I hope this is going on the right path, I looked up
/api/apps/v1beta1
was deprecated and kind of just followed along. Please let me know anything else that needs done and I will get it done. Thank you!Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: