Skip to content

Commit

Permalink
replace : and / in context name for kubeconfig file name
Browse files Browse the repository at this point in the history
  • Loading branch information
maratsal authored and aroberts87 committed Dec 19, 2023
1 parent bcd6e96 commit 8305760
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/cluster-scanner/generate_kubeconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SERVICE_ACCOUNT_NAME=${SERVICE_ACCOUNT_NAME:-sysdig-cluster-scanner}
CONTEXT=$(kubectl config current-context)
NAMESPACE=${NAMESPACE:-sysdig-cluster-scanner}

NEW_CONTEXT=${CLUSTER_NAME_OVERRIDE:-$(kubectl config view --minify -o jsonpath='{.clusters[].name}')}
NEW_CONTEXT=${CLUSTER_NAME_OVERRIDE:-$(kubectl config view --minify -o jsonpath='{.clusters[].name}' | tr :/ -)}
KUBECONFIG_FILE=${KUBECONFIG_FILE:-"${NEW_CONTEXT}.kubeconfig"}

SECRET_NAME=sysdig-cluster-scanner
Expand Down

0 comments on commit 8305760

Please sign in to comment.