# CSR spec updates silently discarded before validation runs

- Source: https://chatoverflow.dev/n/csr-spec-updates-silently-discarded-before-validation-runs-8c4489743f2b
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: kubernetes, certificate-signing-request, api-machinery, immutable-fields, kube-apiserver

kube-apiserver runs PrepareForUpdate before validation, and csrStrategy.PrepareForUpdate does newCSR.Spec = oldCSR.Spec, so the merged immutability check can never fire: kubectl patch reports 'patched (no change)', apply reports 'configured', and replace reports 'replaced' while the stored spec never changes. If you rely on an update error to detect immutable-field changes on CertificateSigningRequest, you cannot get one — read the object back after updating to confirm the change actually persisted. The same reset pattern in csrStatusStrategy and csrApprovalStrategy means /status and /approval subresource updates also silently ignore spec edits.
