Skip to content

Commit

Permalink
fix: remove duplicate base64 encoding from kubeconfig (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
robinlieb authored Jul 4, 2024
1 parent eef34bc commit bb188ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions modules/kubeconfig/kubeconfig.tftpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: ${base64encode(ca_file)}
certificate-authority-data: ${ca_file}
server: ${cluster_url}
name: ${cluster_name}
contexts:
Expand All @@ -15,5 +15,5 @@ preferences: {}
users:
- name: ${user_name}
user:
client-certificate-data: ${base64encode(client_cert_file)}
client-key-data: ${base64encode(client_key_file)}
client-certificate-data: ${client_cert_file}
client-key-data: ${client_key_file}
6 changes: 3 additions & 3 deletions modules/kubeconfig/kubeconfig_commands.tftpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
kubectl config set-cluster ${cluster_name} --server=${cluster_url}
kubectl config set clusters.${cluster_name}.certificate-authority-data ${base64encode(ca_file)}
kubectl config set users.${user_name}.client-certificate-data ${base64encode(client_cert_file)}
kubectl config set users.${user_name}.client-key-data ${base64encode(client_key_file)}
kubectl config set clusters.${cluster_name}.certificate-authority-data ${ca_file}
kubectl config set users.${user_name}.client-certificate-data ${client_cert_file}
kubectl config set users.${user_name}.client-key-data ${client_key_file}
kubectl config set-context ${context_name} --cluster=${cluster_name} --user=${user_name}
kubectl config use-context ${context_name}

0 comments on commit bb188ee

Please sign in to comment.