mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Merge pull request #41139 from juanvallejo/jvallejo/set-cluster-api-value
Automatic merge from submit-queue config set cluster api value Related bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1420280 **Release note**: ```release-note release-note-none ``` This patch sets a specified api version if one is given while setting cluster values in kubeconfig cc @AdoHe @pweil-
This commit is contained in:
commit
0d53679efc
@ -121,6 +121,9 @@ func (o createClusterOptions) run() error {
|
||||
func (o *createClusterOptions) modifyCluster(existingCluster clientcmdapi.Cluster) clientcmdapi.Cluster {
|
||||
modifiedCluster := existingCluster
|
||||
|
||||
if o.apiVersion.Provided() {
|
||||
modifiedCluster.APIVersion = o.apiVersion.Value()
|
||||
}
|
||||
if o.server.Provided() {
|
||||
modifiedCluster.Server = o.server.Value()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user