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 in order to use defaults in the schema #1067

Closed
jessesuen opened this issue Apr 6, 2021 · 0 comments · Fixed by #1069
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jessesuen
Copy link
Member

Summary

This is a pre-1.0 issue and must/will be fixed by v1.0. When applying the apiextensions.k8s.io/v1 CRD against a cluster which had previously installed apiextensions.k8s.io/v1beta1 version of the rollout CRDs, the kubectl apply will fail with the following error:

...
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomResourceDefinition"
Name: "rollouts.argoproj.io", Namespace: ""
for: "./manifests/crds": CustomResourceDefinition.apiextensions.k8s.io "rollouts.argoproj.io" is invalid: spec.preserveUnknownFields: Invalid value: true: must be false in order to use defaults in the schema

This means anyone upgrading from v0.10 to v1 will face this issue (so we must fix this before releasing v1.0).

The problem is, spec.preserveUnknownFields was defaulted to false in apiextensions.k8s.io/v1beta1, but is now defaulted to true in apiextensions.k8s.io/v1. And because neither version of our v0.10 or v1.0 CRDs currently specifies this value, when kubectl apply happens, it preserves the existing version of true, which is disallowed in apiextensions.k8s.io/v1.

To fix this, we should explicitly set spec.preserveUnknownFields: false in the v1 CRD, in order to allow a smooth upgrade.

Diagnostics

What version of Argo Rollouts are you running? v1.0 pre-release

# Paste the logs from the rollout controller

# Logs for the entire controller:
kubectl logs -n argo-rollouts deployment/argo-rollouts

# Logs for a specific rollout:
kubectl logs -n argo-rollouts deployment/argo-rollouts | grep rollout=<ROLLOUTNAME>

Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.

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
1 participant