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:
Oliver Bähler
2026-08-11 12:03:16 +02:00
committed by GitHub
parent bdcdcefe63
commit 93fafdc2fd
9 changed files with 614 additions and 58 deletions
@@ -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" ||