refact(e2e): Cleanup csi-driver CR before applying update operator yaml (#379)

Signed-off-by: w3aman <aman.gupta@mayadata.io>
This commit is contained in:
Aman Gupta 2021-09-13 14:35:51 +05:30 committed by GitHub
parent 4cef9edd73
commit 605d075b9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -117,6 +117,15 @@
regexp: "replicas: 1" regexp: "replicas: 1"
replace: "replicas: {{ zfs_ctrl_replicas }}" replace: "replicas: {{ zfs_ctrl_replicas }}"
## Due to Newly added `storageCapacity` Parameter in csidriver spec
## Reapply with updated yaml will fail due to change in immutable field.
- name: Clean up the CSIDriver CR before upgrade operator
shell: kubectl delete csidriver zfs.csi.openebs.io
args:
executable: /bin/bash
register: csidriver
failed_when: "csidriver.rc != 0"
- name: Apply the zfs_operator file to deploy zfs-driver components to the newer version - name: Apply the zfs_operator file to deploy zfs-driver components to the newer version
shell: shell:
kubectl apply -f ./new_zfs_operator.yml kubectl apply -f ./new_zfs_operator.yml