This commit is contained in:
2025-01-20 10:50:26 +01:00
commit 522fb5d9a0
5 changed files with 135 additions and 0 deletions

29
install.sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/bash
ARG1=$1
NAMESPACE=$(cat namespace)
VERSION=8.8.3
echo "Namespace: $NAMESPACE"
. ~/Workspace/MyKubernetesEnv/ENVDB1
if [ "$ARG1" = "initial" ]; then
psql << EOF
create user saerbeckgrafana;
commit;
create database saerbeckgrafana with owner saerbeckgrafana;
EOF
fi
./roll-db-credential.sh
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
helm upgrade --install -f values.yml grafana3 grafana/grafana --version $VERSION --namespace=$NAMESPACE
kubectl annotate deployments grafana3 -n $NAMESPACE --overwrite=true secret.reloader.stakater.com/reload=grafana-db-cred
kubectl -f ingress.yml -n $NAMESPACE apply