Skip to content

Commit

Permalink
Fix the creation of kactus kubeconfig file
Browse files Browse the repository at this point in the history
kactus-serviceaccount-and-rbac.yaml is in the manifests directory;
insure that get found properly.

Signed-off-by: Abdallah Chatila <[email protected]>
  • Loading branch information
kmabda committed Oct 26, 2020
1 parent 2163b55 commit 62e6e19
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/create-kubeconfig.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/sh
#!/bin/bash

set -eo pipefail

cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"

config_dir=${1:-/tmp/kubeconfig}
kubecfg_file=${2:-kactus-kubeconfig.yaml}
namespace=${3:-kube-system}
Expand All @@ -13,7 +15,7 @@ fi
kubecfg_path=${config_dir}/${kubecfg_file}

# create the service account and RBAC permissions
kubectl apply -f kactus-serviceaccount-and-rbac.yaml
kubectl apply -f ../manifests/kactus-serviceaccount-and-rbac.yaml
# get the secret name from the service account
secret_name=$(kubectl get sa kactus -n $namespace -o jsonpath="{.secrets[*].name}")
# extract the ca.crt from the secret
Expand Down

0 comments on commit 62e6e19

Please sign in to comment.