Skip to content

Commit

Permalink
Add namespace as command line arg
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Davidson committed Aug 15, 2023
1 parent 58a89d4 commit 908f808
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions publish-keys.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
kubectl create configmap authorized-keys-configmap \
NAMESPACE="$1"
if [[ -z $1 ]]; then
NAMESPACE=default
fi
echo Installing in namespace $NAMESPACE
kubectl -n $NAMESPACE create configmap authorized-keys-configmap \
"--from-literal=authorized_keys=$(cat ~/.ssh/*.pub)" --dry-run=client -o yaml | \
kubectl apply -f -
kubectl -n $NAMESPACE apply -f -

0 comments on commit 908f808

Please sign in to comment.