-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
UPSTREAM: 45743: pick 45743 to fix config groupversion defaults #16976
UPSTREAM: 45743: pick 45743 to fix config groupversion defaults #16976
Conversation
@deads2k this is not a clean pick - requires updating origin files such as |
@deads2k These are the only changes actually needed for the fix from the upstream PR: https://github.com/openshift/origin/pull/16976/files#diff-ab133704268aa9a193886476b779d5e3 |
@@ -81,8 +80,6 @@ func NewCmdConfigSetCluster(out io.Writer, configAccess clientcmd.ConfigAccess) | |||
options.insecureSkipTLSVerify.Default(false) | |||
|
|||
cmd.Flags().Var(&options.server, clientcmd.FlagAPIServer, clientcmd.FlagAPIServer+" for the cluster entry in kubeconfig") | |||
cmd.Flags().Var(&options.apiVersion, clientcmd.FlagAPIVersion, "DEPRECATED: "+clientcmd.FlagAPIVersion+" for the cluster entry in kubeconfig") |
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.
when did we deprecate the flag? You may not be able to remove the altogether.
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.
when did we deprecate the flag? You may not be able to remove the altogether.
Don't respect it, sure. But if we didn't deprecate in 3.6 or before, flag removal is naughty.
if err != nil { | ||
return nil, err | ||
} | ||
config.GroupVersion = negotiatedVersion | ||
|
||
if requiredVersion != nil { |
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 pull looks vaguely familiar. Was it mine?
I feel like remember doing this. I don't know what all was left out of this, but the central idea looks fine. |
/approve |
e44d608
to
1a4ab05
Compare
@deads2k thanks, went ahead and only picked the relevant parts of the upstream PR that fix https://bugzilla.redhat.com/show_bug.cgi?id=1503910 - leaving all of the changes that deprecate / remove cluster.APIVersion out |
/retest |
1a4ab05
to
4df1f41
Compare
/test extended_conformance_gce |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, juanvallejo, liggitt The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
Automatic merge from submit-queue. |
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1503910
Picks upstream changes introduced in https://github.com/kubernetes/kubernetes/pull/45743/files
which fix a bug where setting kubernetes defaults on a rest config would sometimes overwrite its ContentConfig.GroupVersion field with the wrong group version - causing resources such as
cronjob.v2alpha1.batch
to return an error [1] when attempted to be described throughoc
.cc @deads2k @fabianofranz