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:
Kubernetes Submit Queue 2017-03-24 12:10:55 -07:00 committed by GitHub
commit 0d53679efc

View File

@ -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()
}