UNCLASSIFIED

Commit 14ad512d authored by michaelmcleroy's avatar michaelmcleroy
Browse files

feat(kubeconfig): update default name

parent 1b4eae90
......@@ -15,6 +15,10 @@ resource "null_resource" "kubeconfig" {
# Merge new config into existing
export KUBECONFIGBAK=$KUBECONFIG
export KUBECONFIG=~/.kube/new:~/.kube/config
# Replace default with cluster name
sed -ri 's/: default$/: ${var.name}/g'
# Update user only with more info
sed -ri 's/(user|- name): ${var.name}$/\1: clusterUser_${var.name}/g' ~/.kube/new
# Do not redirect to ~/.kube/config or you may truncate the results
kubectl config view --flatten > ~/.kube/merged
mv -f ~/.kube/merged ~/.kube/config
......
variable "name" {
description = "The name to apply to the resources"
type = string
default = "bigbang-dev"
}
variable "kubeconfig_path" {
description = "Remote path to kubeconfig"
type = string
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment