mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-08-25 16:07:24 +00:00
fix: do not mutate on update and bound pvcs (#2073)
* fix: do not mutate on update and bound pvcs Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * fix: do not mutate on update and bound pvcs Signed-off-by: Oliver Baehler <oliver@sudo-i.net> --------- Signed-off-by: Oliver Baehler <oliver@sudo-i.net>
This commit is contained in:
@@ -539,6 +539,11 @@ spec:
|
||||
{{- with $.Values.webhooks.matchConditions }}
|
||||
{{- toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
- name: skip-bound-pvc-updates
|
||||
expression: >
|
||||
request.operation != "UPDATE" ||
|
||||
!has(oldObject.status.phase) ||
|
||||
oldObject.status.phase != "Bound"
|
||||
- name: requires-pvc-spec-validation
|
||||
expression: >
|
||||
request.operation != "UPDATE" ||
|
||||
@@ -1238,6 +1243,11 @@ spec:
|
||||
{{- with $.Values.webhooks.matchConditions }}
|
||||
{{- toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
- name: skip-bound-pvc-updates
|
||||
expression: >
|
||||
request.operation != "UPDATE" ||
|
||||
!has(oldObject.status.phase) ||
|
||||
oldObject.status.phase != "Bound"
|
||||
- name: requires-pvc-spec-validation
|
||||
expression: >
|
||||
request.operation != "UPDATE" ||
|
||||
|
||||
Reference in New Issue
Block a user