Skip to content

Commit

Permalink
fix: cannot uninstall spiderpool when sriovOperatorConfig is installed
Browse files Browse the repository at this point in the history
Signed-off-by: ty-dc <tao.yang@daocloud.io>
  • Loading branch information
ty-dc committed Sep 4, 2024
1 parent b6a0ef8 commit 6b26966
Show file tree
Hide file tree
Showing 8 changed files with 210 additions and 147 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,11 @@ clean: clean_e2e

.PHONY: clean_e2e_spiderpool
clean_e2e_spiderpool:
-$(QUIET) make -C test uninstall_spiderpool
$(QUIET) make -C test uninstall_spiderpool

.PHONY: upgrade_e2e_spiderpool
upgrade_e2e_spiderpool:
-$(QUIET) make -C test upgrade_spiderpool
$(QUIET) make -C test upgrade_spiderpool

.PHONY: codegen
codegen:
Expand Down
6 changes: 5 additions & 1 deletion charts/spiderpool/templates/deleteHook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: {{ .Values.spiderpoolController.name | trunc 48 | trimSuffix "-" }}-hook-pre-delete
annotations:
"helm.sh/hook": pre-delete
"helm.sh/hook-delete-policy": hook-succeeded,hook-failed
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
spec:
template:
spec:
Expand All @@ -22,6 +22,10 @@ spec:
- --mutating
- {{ .Values.spiderpoolController.name | trunc 63 | trimSuffix "-" }}
env:
- name: SPIDERPOOL_POD_NAMESPACE
value: {{ .Release.Namespace | quote }}
- name: SPIDERPOOL_INIT_NAME
value: {{ .Values.spiderpoolInit.name | trunc 63 | trimSuffix "-" | quote }}
- name: SPIDERPOOL_POD_NAME
valueFrom:
fieldRef:
Expand Down
2 changes: 2 additions & 0 deletions charts/spiderpool/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ rules:
- mutatingwebhookconfigurations
- validatingwebhookconfigurations
verbs:
- delete
- get
- list
- watch
Expand Down Expand Up @@ -88,6 +89,7 @@ rules:
- cronjobs
- jobs
verbs:
- delete
- get
- list
- update
Expand Down
Loading

0 comments on commit 6b26966

Please sign in to comment.