bulky-match-1583
05/25/2020, 10:38 AMcluster_info = pulumi.Output.all(cluster.name, cluster.endpoint, cluster.master_auth)
kube_config = cluster_info.apply(
lambda info: """apiVersion: v1
clusters:
- cluster:
certificate-authority-data: {0}
server: https://{1}
name: {2}
contexts:
- context:
cluster: {2}
user: {2}
name: {2}
current-context: {2}
kind: Config
preferences: {{}}
users:
- name: {2}
user:
auth-provider:
config:
cmd-args: config config-helper --format=json
cmd-path: gcloud
expiry-key: '{{.credential.token_expiry}}'
token-key: '{{.credential.access_token}}'
name: gcp
""".format(cluster_info[2]['clusterCaCertificate'], cluster_info[1], '{0}_{1}_{2}'.format(
config.customer_name, config.env_name, config.gcp_region)))