split cnpg test and improve cnpg wait verbosity

This commit is contained in:
Kjeld Schouten-Lebbing
2023-02-24 09:36:07 +01:00
parent 4595749509
commit 7b4268f9af
4 changed files with 120 additions and 56 deletions

View File

@@ -128,6 +128,7 @@ jobs:
- netshoot-values.yaml
- metrics-values.yaml
- cnpg-values.yaml
- cnpg-multi-values.yaml
- manifest-values.yaml
- stagingmanifest-values.yaml
@@ -252,6 +253,7 @@ jobs:
# - netshoot-values.yaml
- metrics-values.yaml
- cnpg-values.yaml
- cnpg-multi-values.yaml
- manifest-values.yaml
- stagingmanifest-values.yaml
- vpn-gluetun-values.yaml

View File

@@ -0,0 +1,115 @@
service:
main:
enabled: true
ports:
main:
enabled: true
port: 8080
workload:
main:
enabled: true
podSpec:
containers:
main:
enabled: true
args:
- --port
- "8080"
probes:
liveness:
enabled: true
readiness:
enabled: true
startup:
enabled: true
manifestManager:
enabled: true
staging: true
cnpg:
main:
enabled: true
# -- number of instances for both postgres and pgbouncer
instances: 2
database: "app"
user: "app"
# password:
# superUserPassword:
# -- change to supervised to disable unsupervised updates
# Example of rolling update strategy:
# - unsupervised: automated update of the primary once all
# replicas have been upgraded (default)
# - supervised: requires manual supervision to perform
# the switchover of the primary
primaryUpdateStrategy: unsupervised
# -- enable to create extra pgbouncer for readonly access
acceptRO: false
# -- storage size for the two pvc's per instance
storage:
size: "256Gi"
walsize: "256Gi"
pooler:
instances: 2
# -- set to enable prometheus metrics
monitoring:
enablePodMonitor: false
# -- contains credentials and urls output by generator
creds: {}
ro:
enabled: true
# -- number of instances for both postgres and pgbouncer
instances: 2
database: "app2"
user: "app2"
# password:
# superUserPassword:
# -- change to supervised to disable unsupervised updates
# Example of rolling update strategy:
# - unsupervised: automated update of the primary once all
# replicas have been upgraded (default)
# - supervised: requires manual supervision to perform
# the switchover of the primary
primaryUpdateStrategy: unsupervised
# -- enable to create extra pgbouncer for readonly access
acceptRO: true
# -- storage size for the two pvc's per instance
storage:
size: "256Gi"
walsize: "256Gi"
pooler:
instances: 2
# -- set to enable prometheus metrics
monitoring:
enablePodMonitor: false
# -- contains credentials and urls output by generator
creds: {}
mon:
enabled: true
# -- number of instances for both postgres and pgbouncer
instances: 2
database: "app2"
user: "app2"
# password:
# superUserPassword:
# -- change to supervised to disable unsupervised updates
# Example of rolling update strategy:
# - unsupervised: automated update of the primary once all
# replicas have been upgraded (default)
# - supervised: requires manual supervision to perform
# the switchover of the primary
primaryUpdateStrategy: unsupervised
# -- enable to create extra pgbouncer for readonly access
acceptRO: true
# -- storage size for the two pvc's per instance
storage:
size: "256Gi"
walsize: "256Gi"
pooler:
instances: 2
# -- set to enable prometheus metrics
monitoring:
enablePodMonitor: true
# -- contains credentials and urls output by generator
creds: {}

View File

@@ -57,59 +57,3 @@ cnpg:
enablePodMonitor: false
# -- contains credentials and urls output by generator
creds: {}
ro:
enabled: true
# -- number of instances for both postgres and pgbouncer
instances: 2
database: "app2"
user: "app2"
# password:
# superUserPassword:
# -- change to supervised to disable unsupervised updates
# Example of rolling update strategy:
# - unsupervised: automated update of the primary once all
# replicas have been upgraded (default)
# - supervised: requires manual supervision to perform
# the switchover of the primary
primaryUpdateStrategy: unsupervised
# -- enable to create extra pgbouncer for readonly access
acceptRO: true
# -- storage size for the two pvc's per instance
storage:
size: "256Gi"
walsize: "256Gi"
pooler:
instances: 2
# -- set to enable prometheus metrics
monitoring:
enablePodMonitor: false
# -- contains credentials and urls output by generator
creds: {}
mon:
enabled: true
# -- number of instances for both postgres and pgbouncer
instances: 2
database: "app2"
user: "app2"
# password:
# superUserPassword:
# -- change to supervised to disable unsupervised updates
# Example of rolling update strategy:
# - unsupervised: automated update of the primary once all
# replicas have been upgraded (default)
# - supervised: requires manual supervision to perform
# the switchover of the primary
primaryUpdateStrategy: unsupervised
# -- enable to create extra pgbouncer for readonly access
acceptRO: true
# -- storage size for the two pvc's per instance
storage:
size: "256Gi"
walsize: "256Gi"
pooler:
instances: 2
# -- set to enable prometheus metrics
monitoring:
enablePodMonitor: true
# -- contains credentials and urls output by generator
creds: {}

View File

@@ -420,15 +420,18 @@ command:
{{ $cnpgName := include "tc.v1.common.lib.chart.names.fullname" $ }}
{{ $cnpgName = printf "%v-cnpg-%v" $cnpgName $name }}
until
echo "Testing database on url: {{ $cnpgName }}"
pg_isready -U {{ .user }} -h {{ $cnpgName }}
do sleep 2
done
until
echo "Testing database on url: {{ $cnpgName }}-rw"
pg_isready -U {{ .user }} -h {{ $cnpgName }}-rw
do sleep 2
done
{{ if $cnpg.acceptRO }}
until
echo "Testing database on url: {{ $cnpgName }}-ro"
pg_isready -U {{ .user }} -h {{ $cnpgName }}-ro
do sleep 2
done