Skip to content

Commit

Permalink
Update postgres-ha-hook blueprint with latest application changes and…
Browse files Browse the repository at this point in the history
… kanister tool image (#2095)

Signed-off-by: Akanksha Kumari <akankshakumari393@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
akankshakumari393 and mergify[bot] committed Jun 13, 2023
1 parent be0f4e9 commit ff719a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/postgresql-ha/hook-blueprint/postgres-ha-hook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ actions:
timeout: 240s
conditions:
anyOf:
- condition: '{{ if { $.status.containerStatuses[].ready } }}true{{ else }}false{{ end }}'
- condition: '{{ if "$.status.containerStatuses[].ready"}}true{{ else }}false{{ end }}'
objectReference:
apiVersion: v1
resource: pods
Expand All @@ -26,7 +26,7 @@ actions:
namespace: '{{ .StatefulSet.Namespace }}'
args:
namespace: '{{ .StatefulSet.Namespace }}'
image: ghcr.io/kanisterio/postgres-kanister-tools:0.69.0
image: ghcr.io/kanisterio/postgres-kanister-tools:0.92.0
command:
- bash
- -o
Expand All @@ -36,7 +36,7 @@ actions:
- -c
- |
export PGHOST='{{ .StatefulSet.Name }}.{{ .StatefulSet.Namespace }}.svc.cluster.local'
export PGPASSWORD='{{ index .Phases.PgUpdate.Secrets.pgSecret.Data "postgresql-password" | toString }}'
export PGPASSWORD='{{ index .Phases.PgUpdate.Secrets.pgSecret.Data "password" | toString }}'
export PGREPL='{{ index .Phases.PgUpdate.Secrets.pgSecret.Data "repmgr-password" | toString }}'
postgresMaster=$(psql -U postgres -h $PGHOST -d repmgr -t -c "select node_name from repmgr.nodes where type='primary'")
postgresStandby=$(psql -U postgres -h $PGHOST -d repmgr -t -c "select node_name from repmgr.nodes where type='standby'")
Expand Down

0 comments on commit ff719a2

Please sign in to comment.