projectsyn / lieutenant-operator

The Project Syn Inventory API Operator
https://docs.syn.tools/lieutenant-operator/
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Explicitly set `preserveUnknownFields` to `false` #270

Closed bastjan closed 3 months ago

bastjan commented 3 months ago

This is a leftover from pre-v1 lieutenant. CRDs had the API version v1beta1 which, when converted to v1, set preserveUnknownFields=true. Since the field was never explicitly managed it stayed true on clusters that had lieutenant < v1 installed and was false on clusters that never used a < v1 lieutenant.

The introduction of kubebuilder defaults with the upgrade of k8s.io/api/core broke old installations since defaults are not compatible with preserveUnknownFields=true.

This commit explicitly sets preserveUnknownFields to false in all CRDs.

Commit changing API version: https://github.com/projectsyn/lieutenant-operator/commit/8839a084ee005d084fe3f9ab7b814845f93bcc7d

Dependency upgrade: https://github.com/projectsyn/lieutenant-operator/commit/2d59a4c5882822ec7fd53bbfa57e201b8e0b1d5f#diff-3399214b42d027ec91b2533bc7401c1b69aa8bbf96f2870840cc03ca2d0ebebdR184

Checklist