diff --git a/deployment/roll-db-credential.sh b/deployment/roll-db-credential.sh index 5e86aba..559f941 100755 --- a/deployment/roll-db-credential.sh +++ b/deployment/roll-db-credential.sh @@ -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