mirror of
https://github.com/truecharts/library-charts.git
synced 2026-07-05 15:46:21 -03:00
split cnpg test and improve cnpg wait verbosity
This commit is contained in:
2
.github/workflows/common_library_tests.yaml
vendored
2
.github/workflows/common_library_tests.yaml
vendored
@@ -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
|
||||
|
||||
115
library/common-test/ci/cnpg-multi-values.yaml
Normal file
115
library/common-test/ci/cnpg-multi-values.yaml
Normal 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: {}
|
||||
@@ -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: {}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user