1
0
mirror of https://github.com/rancher/rke.git synced 2025-04-28 03:31:24 +00:00

append clusterName to user and context so as to allow multiple kubeconfig files

This commit is contained in:
Jess Males 2018-08-08 10:17:11 -07:00 committed by Alena Prokharchyk
parent 4bb01e8f6b
commit 22457607ea

View File

@ -14,11 +14,11 @@ clusters:
contexts: contexts:
- context: - context:
cluster: "` + clusterName + `" cluster: "` + clusterName + `"
user: "` + componentName + `" user: "` + componentName + `-` + clusterName + `"
name: "Default" name: "` + clusterName + `"
current-context: "Default" current-context: "` + clusterName + `"
users: users:
- name: "` + componentName + `" - name: "` + componentName + `-` + clusterName + `"
user: user:
client-certificate: ` + crtPath + ` client-certificate: ` + crtPath + `
client-key: ` + keyPath + `` client-key: ` + keyPath + ``
@ -36,11 +36,11 @@ clusters:
contexts: contexts:
- context: - context:
cluster: "` + clusterName + `" cluster: "` + clusterName + `"
user: "` + componentName + `" user: "` + componentName + `-` + clusterName + `"
name: "Default" name: "` + clusterName + `"
current-context: "Default" current-context: "` + clusterName + `"
users: users:
- name: "` + componentName + `" - name: "` + componentName + `-` + clusterName + `"
user: user:
client-certificate-data: ` + base64.StdEncoding.EncodeToString([]byte(crt)) + ` client-certificate-data: ` + base64.StdEncoding.EncodeToString([]byte(crt)) + `
client-key-data: ` + base64.StdEncoding.EncodeToString([]byte(key)) + `` client-key-data: ` + base64.StdEncoding.EncodeToString([]byte(key)) + ``