Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly set preserveUnknownFields to false #270

Merged
merged 1 commit into from
May 30, 2024

Conversation

bastjan
Copy link
Contributor

@bastjan bastjan commented May 30, 2024

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: 8839a08

Dependency upgrade: 2d59a4c#diff-3399214b42d027ec91b2533bc7401c1b69aa8bbf96f2870840cc03ca2d0ebebdR184

Checklist

  • Keep pull requests small so they can be easily reviewed.
  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog

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 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: 8839a08
@bastjan bastjan added the bug Something isn't working label May 30, 2024
@bastjan bastjan requested a review from a team May 30, 2024 08:38
@bastjan bastjan marked this pull request as ready for review May 30, 2024 08:38
@bastjan bastjan merged commit 7d1091e into master May 30, 2024
6 checks passed
@bastjan bastjan deleted the explicitly-set-preserveUnknownFields branch May 30, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants