kyverno: force_new on sync-ghcr-credentials — generate rules are immutable
Pipeline 138: the validate-policy webhook denies in-place edits of a generate rule (allowlist additions). force_new = delete+recreate; generated secrets survive and generateExisting re-adopts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
6b0d42c7bc
commit
12bdd06f74
1 changed files with 5 additions and 0 deletions
|
|
@ -47,6 +47,11 @@ resource "kubernetes_secret" "ghcr_credentials" {
|
|||
}
|
||||
|
||||
resource "kubectl_manifest" "sync_ghcr_credentials" {
|
||||
# Kyverno's validate-policy webhook DENIES in-place changes to a generate
|
||||
# rule's spec ("changes of immutable fields ... is disallowed"), so any
|
||||
# allowlist edit must delete+recreate the policy. Generated secrets survive
|
||||
# policy deletion; generateExisting re-adopts them on recreate.
|
||||
force_new = true
|
||||
yaml_body = yamlencode({
|
||||
apiVersion = "kyverno.io/v1"
|
||||
kind = "ClusterPolicy"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue