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

spec.preserveUnknownFields: Invalid value: true: must be false #4206

Closed
camelpunch opened this issue Aug 11, 2021 · 2 comments
Closed

spec.preserveUnknownFields: Invalid value: true: must be false #4206

camelpunch opened this issue Aug 11, 2021 · 2 comments

Comments

@camelpunch
Copy link

What happened?

We had a running operator bundle.yaml at v0.39.0. When we applied the bundle from v0.49.0, we got an error:

spec.preserveUnknownFields: Invalid value: true: must be false

This occurred when attempting to apply the new prometheuses.monitoring.coreos.com CRD.

We're running a GKE cluster at v1.20.8-gke.900. The previous prometheuses CRD was apiextensions.k8s.io/v1, as is the new one.

See a similar issue over at Calico: projectcalico/calico#4237

We'll probably try to re-apply after changing the field to false.

Did you expect to see something different?

Expected the bundle to apply without error.

How to reproduce it (as minimally and precisely as possible):

Apply these upgrades on a similar cluster version?

Environment

  • Prometheus Operator version:

    Upgrade from v0.39.0 to v0.49.0

  • Kubernetes version information:

    Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.1", GitCommit:"206bcadf021e76c27513500ca24182692aabd17e", GitTreeState:"clean", BuildDate:"2020-09-09T11:26:42Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"20+", GitVersion:"v1.20.8-gke.900", GitCommit:"28ab8501be88ea42e897ca8514d7cd0b436253d9", GitTreeState:"clean", BuildDate:"2021-06-30T09:23:36Z", GoVersion:"go1.15.13b5", Compiler:"gc", Platform:"linux/amd64"}

  • Kubernetes cluster kind:

    GKE

  • Manifests:

vanilla bundle.yaml from both versions with only namespaces changed via kustomize.

  • Prometheus Operator Logs:

This is a kubernetes API issue.

Anything else we need to know?:

@paulfantom
Copy link
Member

paulfantom commented Aug 18, 2021

We do not set spec.preserveUnknownFields and CRDs are generated with the default value set by controller-gen. Controller-gen sets this to false when CRDs v1 is used. In fact grep preserveUnknownFields bundle.yaml doesn't return any match.

Setting preserveUnknownFields=false is made explicit in #4221

@stale
Copy link

stale bot commented Oct 17, 2021

This issue has been automatically marked as stale because it has not had any activity in the last 60 days. Thank you for your contributions.

@stale stale bot added the stale label Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants