Dennis-Mircea Ciupitu created FLINK-39509:
---------------------------------------------
Summary: Mutating webhook produce spurious object modifications on
no-op patches
Key: FLINK-39509
URL: https://issues.apache.org/jira/browse/FLINK-39509
Project: Flink
Issue Type: Bug
Components: Kubernetes Operator
Reporter: Dennis-Mircea Ciupitu
The mutating webhook's {{FlinkMutator}} always performs a Jackson
{{convertValue}} serialization round-trip (HasMetadata -> typed class -> back)
on every CREATE/UPDATE admission request. When no {{FlinkResourceMutator}}
actually modifies the resource, the round-tripped object can serialize
differently from the original input (e.g., field ordering, null handling),
causing the webhook to return a JSON patch to the API server even though
nothing was logically changed.
This leads to inconsistent behavior where {{kubectl patch}} reports {{patched}}
instead of {{patched (no change)}} for resources like {{FlinkDeployment}}, even
when the patch contains no effective change (e.g., setting {{restartNonce}} to
its current value). While this does not trigger an actual reconciliation (the
operator correctly detects no spec diff), it is confusing and causes
unnecessary {{resourceVersion}} bumps on the Kubernetes object.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)