script for cm deployment

This commit is contained in:
2024-11-12 14:32:00 +01:00
parent 5de40eccc0
commit c2c998a3f6
2 changed files with 308 additions and 0 deletions

20
deploy-cm.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
dashboardproviders="dbconn garpa test"
dbconn="dbconn-default loki-quick-search"
garpa="loki-quick-search"
test="dbconn-default loki-quick-search"
for dashboardprovider in $dashboardproviders
do
echo "Creating ConfigMap ${dashboardprovider}-dashboards"
dashboards=""
for dashboard in ${!dashboardprovider}
do
echo " ... with dashboard ${dashboard}"
dashboards="$dashboards --from-file=dashboards/${dashboard}.json"
done
kubectl delete configmap ${dashboardprovider}-dashboards -n mla
kubectl create configmap ${dashboardprovider}-dashboards -n mla $dashboards
done