IBM-Cloud / bluemix-go

Go library for accessing the Bluemix API
Apache License 2.0
37 stars 89 forks source link

ibm_container_cluster_config: Certificate authority file is deleted if the cluster name contains "kube" #58

Closed mmajis closed 7 years ago

mmajis commented 7 years ago

The data source ibm_container_cluster_config downloads the kubectl config yaml and the CA certificate. If the cluster name contains the string "kube", the CA file is subsequently deleted here: https://github.com/IBM-Bluemix/bluemix-go/blob/b49bb614b336a07449499e79bc04c806d02d65d6/api/container/containerv1/clusters.go#L225

This leaves the downloaded cluster configuration in an unusable state:

error: unable to read certificate-authority .../631d734bca9ca12d1960a58aea06b21af4485745_kubepoc-be1a169f_k8sconfig/ca-ams03-kubepoc-be1a169f.pem for kubepoc-be1a169f due to open .../631d734bca9ca12d1960a58aea06b21af4485745_kubepoc-be1a169f_k8sconfig/ca-ams03-kubepoc-be1a169f.pem: no such file or directory