diff --git a/generate-secrets.sh b/generate-secrets.sh index db64a53..10b7f98 100755 --- a/generate-secrets.sh +++ b/generate-secrets.sh @@ -1,13 +1,17 @@ #!/bin/bash +NAMESPACE="$1" +if [[ -z $1 ]]; then + NAMESPACE=default +fi -kubectl create secret generic database-auth-secret \ +kubectl -n $NAMESPACE create secret generic database-auth-secret \ --dry-run=client \ --from-literal=password=$(tr -dc 'A-Za-z0-9' /dev/null | base64 -w 0) \ -o yaml | \ -kubectl apply -f - \ No newline at end of file +kubectl -n $NAMESPACE apply -f - \ No newline at end of file