other database

This commit is contained in:
Wolfgang Hottgenroth 2025-01-16 21:15:29 +01:00
parent 286e21ad92
commit ae27e973be
Signed by: wn
GPG Key ID: 18FDFA577A8871AD

View File

@ -1,9 +1,6 @@
#!/bin/bash
export PGUSER=`kubectl get secret -n database timescaledb -o jsonpath="{.data.superuser-username}" | base64 --decode`
export PGHOST=`kubectl get services traefik -n system -o jsonpath="{.status.loadBalancer.ingress[0].ip}"`
export PGPASSWORD=`kubectl get secret -n database timescaledb -o jsonpath="{.data.superuser-password}" | base64 --decode`
export PGSSLMODE=require
. ~/Workspace/mykubernetesenv/ENVDB1
DATABASE=zabbix
LOGIN=zabbix
@ -33,7 +30,7 @@ kubectl create secret generic database-cred \
--from-literal=POSTGRES_USER="$LOGIN" \
--from-literal=POSTGRES_PASSWORD="$PASSWORD" \
--from-literal=POSTGRES_DB="$DATABASE" \
--from-literal=DB_SERVER_HOST="timescaledb.database.svc.cluster.local" | \
--from-literal=DB_SERVER_HOST="database.database1.svc.cluster.local" | \
kubectl apply -f - -n $NAMESPACE