Skip to content

Commit 2cef979

Browse files
committed
ci: add ci for csi driver helm charts
adding helm charts for csi driver Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
1 parent 86418b7 commit 2cef979

File tree

1 file changed

+39
-9
lines changed

1 file changed

+39
-9
lines changed

.github/workflows/test-chart.yml

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
pull_request:
55

66
jobs:
7-
test-operator:
8-
name: operator chart
7+
test-helm:
8+
name: helm charts
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Clone the code
@@ -39,25 +39,55 @@ jobs:
3939
run: |
4040
make docker-build
4141
42-
- name: Install Helm
42+
- name: Install helm
4343
run: |
4444
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
4545
46-
- name: Verify Helm installation
46+
- name: Verify helm installation
4747
run: helm version
4848

49-
- name: Lint Helm Chart
49+
- name: Lint operator helm chart
5050
run: |
5151
helm lint ./deploy/charts/ceph-csi-operator
5252
53-
- name: Install Helm chart for project
53+
- name: Install operator helm chart
5454
run: |
55-
helm install my-release ./deploy/charts/ceph-csi-operator --create-namespace --namespace ceph-csi-operator-system
55+
helm install csi-operator ./deploy/charts/ceph-csi-operator --create-namespace --namespace ceph-csi-operator-system
5656
57-
- name: Check Helm release status
57+
- name: Check operator helm release status
5858
run: |
59-
helm status my-release --namespace ceph-csi-operator-system
59+
helm status csi-operator --namespace ceph-csi-operator-system
6060
6161
- name: Check operator is running
6262
run: |
6363
for i in {1..180}; do kubectl get pods -l app.kubernetes.io/name=ceph-csi-operator -n ceph-csi-operator-system -o jsonpath='{.items[0].status.phase}' | grep -q "Running" && exit 0 || sleep 1; done; echo "Pod not running after 3 minutes"; exit 1
64+
65+
- name: Patch operator to watch csi driver namespace
66+
run: |
67+
kubectl patch deployment csi-operator-ceph-csi-operator-controller-manager -nceph-csi-operator-system --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/env/2/value", "value": "csi-driver"}]'
68+
69+
- name: Lint csi driver helm chart
70+
run: |
71+
helm lint ./deploy/charts/ceph-csi-drivers
72+
73+
- name: Install csi driver helm chart
74+
run: |
75+
helm install csi-driver ./deploy/charts/ceph-csi-drivers --create-namespace --namespace csi-driver
76+
77+
- name: Check csi driver helm release status
78+
run: |
79+
helm status csi-driver --namespace csi-driver
80+
81+
- name: Check csi pods are running
82+
run: |
83+
for i in {1..180}; do
84+
if [ $(kubectl get pods -n csi-driver --field-selector=status.phase=Running --no-headers | wc -l) -eq 6 ]; then
85+
exit 0;
86+
fi
87+
sleep 1;
88+
done;
89+
kubectl get pods,deployment,daemonset,replicaset -oyaml -n csi-driver
90+
kubectl get pods,deployment,daemonset,replicaset -n csi-driver
91+
kubectl logs -l app.kubernetes.io/instance=ceph-csi-operator -nceph-csi-operator-system
92+
echo "Pod(s) not running after 3 minutes";
93+
exit 1;

0 commit comments

Comments
 (0)