Skip to content

Commit 9b070de

Browse files
authored
Update ci-helm-lint-test.yml
1 parent 36c33f7 commit 9b070de

File tree

1 file changed

+28
-13
lines changed

1 file changed

+28
-13
lines changed

.github/workflows/ci-helm-lint-test.yml

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,24 +58,24 @@ jobs:
5858
--namespace cert-manager \
5959
--create-namespace \
6060
--set installCRDs=true \
61-
--set prometheus.enabled=false
61+
--set prometheus.enabled=false \
62+
--wait
6263
6364
- name: Install CNPG Operator
6465
run: |
6566
helm repo add cnpg-operator https://cloudnative-pg.github.io/charts
6667
helm repo update
6768
helm install cnpg-operator cnpg-operator/cloudnative-pg \
6869
--namespace cnpg-system \
69-
--create-namespace
70+
--create-namespace \
71+
--wait
7072
7173
- name: Creat testing values
7274
working-directory: ./charts/cloudnative-pg-cluster
7375
run: |
7476
cat << EOF > test-values.yaml
7577
name: "cnpg"
76-
instances: 1
77-
superuserSecret:
78-
name: null
78+
instances: 3
7979
bootstrap:
8080
initdb:
8181
database: app
@@ -100,22 +100,37 @@ jobs:
100100
enablePodMonitor: false
101101
postgresql:
102102
pg_hba:
103-
- hostnossl all all 0.0.0.0/0 reject
104-
- hostssl all all 0.0.0.0/0 cert clientcert=verify-full
103+
- hostssl all all all cert
105104
storage:
106105
size: 1Gi
107106
testApp:
108-
enabled: true
107+
enabled: false
109108
EOF
110109
111110
- name: Install CNPG cluster
112111
working-directory: ./charts/cloudnative-pg-cluster
113112
run: |
114-
#helm repo add cnpg-cluster https://small-hack.github.io/cloudnative-pg-tenant-chart
115-
#helm repo update
116-
#helm install cnpg-cluster cnpg-cluster/cnpg-cluster --values test-values.yaml
117-
helm template . -f test-values.yaml > deploy.yaml
118-
kubectl apply -f deploy.yaml
113+
helm repo add cnpg-cluster https://small-hack.github.io/cloudnative-pg-cluster-chart
114+
helm repo update
115+
helm install cnpg-cluster cnpg-cluster/cnpg-cluster \
116+
--values test-values.yaml
117+
118+
ITER=0
119+
while true; do
120+
if [[ $ITER -ge 300 ]]; then
121+
echo "Cluster not ready"
122+
exit 1
123+
fi
124+
READY_INSTANCES=$(kubectl get cluster cnpg -o jsonpath='{.status.readyInstances}')
125+
if [[ "$READY_INSTANCES" == 3 ]]; then
126+
echo "Cluster up and running"
127+
break
128+
fi
129+
sleep 1
130+
STATUS=$(kubectl get cluster)
131+
echo "$STATUS"
132+
(( ++ITER ))
133+
done
119134
120135
- name: Run chart-testing (install)
121136
id: install

0 commit comments

Comments
 (0)