Skip to content

Commit

Permalink
fix: Align Report-portal psql secret name pattern (#79)
Browse files Browse the repository at this point in the history
Change-Id: I0363bb073116e687505ceeb608df0900ac0eb914
  • Loading branch information
MykolaMarusenko committed May 20, 2024
1 parent be33a8d commit d5b1bbb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions add-ons/report-portal/templates/init-job/init-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ spec:
secret1_found=true
fi
if [ "$secret2_found" = false ] && kubectl get secret postgresql-pguser-postgres --namespace report-portal; then
echo "Secret postgresql-pguser-postgres exists"
if [ "$secret2_found" = false ] && kubectl get secret reportportal-pguser-postgres --namespace report-portal; then
echo "Secret reportportal-pguser-postgres exists"
secret2_found=true
fi
if [ "$secret3_found" = false ] && kubectl get secret postgresql-pguser-rpuser --namespace report-portal; then
echo "Secret postgresql-pguser-rpuser exists"
if [ "$secret3_found" = false ] && kubectl get secret reportportal-pguser-rpuser --namespace report-portal; then
echo "Secret reportportal-pguser-rpuser exists"
secret3_found=true
fi
Expand All @@ -53,8 +53,8 @@ spec:
reportportal_postgresql_postgres_password=$(kubectl get secret reportportal-postgresql-creds --namespace report-portal -o=jsonpath='{.data.postgresql-postgres-password}' | base64 --decode)
# Patch the secrets
kubectl patch secret postgresql-pguser-rpuser --namespace report-portal -p "{\"data\":{\"password\":\"$(echo -n "$reportportal_postgresql_password" | base64)\"}}"
kubectl patch secret postgresql-pguser-postgres --namespace report-portal -p "{\"data\":{\"password\":\"$(echo -n "$reportportal_postgresql_postgres_password" | base64)\"}}"
kubectl patch secret reportportal-pguser-rpuser --namespace report-portal -p "{\"data\":{\"password\":\"$(echo -n "$reportportal_postgresql_password" | base64)\"}}"
kubectl patch secret reportportal-pguser-postgres --namespace report-portal -p "{\"data\":{\"password\":\"$(echo -n "$reportportal_postgresql_postgres_password" | base64)\"}}"
echo "Secrets copied and patched successfully."
restartPolicy: Never
Expand Down

0 comments on commit d5b1bbb

Please sign in to comment.