k8s native config mgmt

This commit is contained in:
tim
2024-07-26 20:09:19 -04:00
parent 0786ec898b
commit 5051461eeb
6 changed files with 130 additions and 0 deletions

27
bin/secret-push Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
if [ "$1" == "" ]; then
echo 'usage: secret-push {config_name} [secret_name]'
exit 1
fi
CONFIG=$1
shift
if [ "$1" != "" ]; then
KEY=backend-$1
else
KEY=backend
fi
FILE="conf/dexorder-$CONFIG.toml"
if [ ! -f "$FILE" ]; then
FILE="conf/$CONFIG/dexorder-$CONFIG.toml"
fi
if [ ! -f "$FILE" ]; then
echo Could not find config file for $1
exit 1;
fi
kubectl create secret generic "$KEY" --from-file ".secret.toml=$FILE" --dry-run=client -o yaml | kubectl apply -f -