Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

CRD Schema errors #680

Closed
asafhm opened this issue Mar 28, 2021 · 0 comments · Fixed by #681
Closed

CRD Schema errors #680

asafhm opened this issue Mar 28, 2021 · 0 comments · Fixed by #681

Comments

@asafhm
Copy link

asafhm commented Mar 28, 2021

Using version 6.4.0 on GKE:

Client Version: version.Info{Major:"1", Minor:"17+", GitVersion:"v1.17.17-dispatcher", GitCommit:"a39a896b5018d0c800124a36757433c660fd0880", GitTreeState:"clean", BuildDate:"2021-01-28T22:06:27Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"17+", GitVersion:"v1.17.15-gke.800", GitCommit:"fa6f8f9671a3ba4b1790bac677bb72b04204e8fc", GitTreeState:"clean", BuildDate:"2020-12-21T09:19:13Z", GoVersion:"go1.13.15b4", Compiler:"gc", Platform:"linux/amd64"}

When I apply manifests using kubectl, everything works great...
But when I try to apply them with terraform v0.14.8 using the kuberntes-alpha official provider by hashicorp, I seem to get the following error:

Error: No valid OpenAPI definition
Resource ExternalSecret.v1.kubernetes-client.io does not have a valid OpenAPI
definition in this cluster.

Usually this is caused by a CustomResource without a schema.

I tried running kubectl describe crd externalsecrets.kubernetes-client.io and indeed saw some strange errors (last lines of the long output):

Last Transition Time: 2021-03-25T10:38:21Z
Message: [spec.validation.openAPIV3Schema.properties[spec].properties[data].items.anyOf[0].properties[isBinary].description: Forbidden: must be empty to be structural, spec.validation.openAPIV3Schema.properties[spec].properties[data].items.anyOf[0].properties[isBinary].type: Forbidden: must be empty to be structural, spec.validation.openAPIV3Schema.properties[spec].properties[data].items.anyOf[0].properties[key].description: Forbidden: must be empty to be structural, spec.validation.openAPIV3Schema.properties[spec].properties[data].items.anyOf[0].properties[key].type: Forbidden: must be empty to be structural, spec.validation.openAPIV3Schema.properties[spec].properties[data].items.anyOf[0].properties[name].description: Forbidden: must be empty to be structural, spec.validation.openAPIV3Schema.properties[spec].properties[data].items.anyOf[0].properties[name].type: Forbidden: must be empty to be structural, spec.validation.openAPIV3Schema.properties[spec].properties[data].items.anyOf[0].properties[property].description: Forbidden: must be empty to be structural, spec.validation.openAPIV3Schema.properties[spec].properties[data].items.anyOf[1].properties[path].description: Forbidden: must be empty to be structural, spec.validation.openAPIV3Schema.properties[spec].properties[data].items.anyOf[1].properties[recursive].description: Forbidden: must be empty to be structural, spec.validation.openAPIV3Schema.properties[spec].properties[data].items.anyOf[1].properties[recursive].type: Forbidden: must be empty to be structural, spec.validation.openAPIV3Schema.type: Required value: must not be empty at the root]
Reason: Violations
Status: True
Type: NonStructuralSchema
Last Transition Time: 2021-03-25T10:38:21Z
Message: no conflicts found
Reason: NoConflicts
Status: True
Type: NamesAccepted
Last Transition Time: 2021-03-25T10:38:21Z
Message: the initial names have been accepted
Reason: InitialNamesAccepted
Status: True
Type: Established

Seem like there are indeed schema issues that nitpicking terraform fails to go along with.
Maybe this is something that is easily fixed?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant