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

CRD issue for Kubernetes v1.18+ #260

Closed
SaaldjorMike opened this issue Nov 11, 2020 · 3 comments
Closed

CRD issue for Kubernetes v1.18+ #260

SaaldjorMike opened this issue Nov 11, 2020 · 3 comments

Comments

@SaaldjorMike
Copy link
Member

SaaldjorMike commented Nov 11, 2020

As part of #259 I stumbled upon a problem with controller-gen which looks like it is related to kubernetes-sigs/controller-tools#444. Seems like there's not a newer build available for controller-gen right now that fixes the problem for us. I did try upgrading controller-gen from v0.3.0 to v0.4.0 locally and it does seem to use the stable API for the CRD objects instead of the v1beta1 API, but the same problem persists.

Until now we've been using the image kindest/node:v1.17.11 for local kind tests but the GitHub Action workflow pulls in a newer version when running E2E tests (kindest/node:v1.19.1) which is failing to accept our CRD for the HumioCluster resource (after the changes in #259) when running kubectl apply -f .... to install it. I did a bit more testing, and this is what I found:

kindest/node:v1.18.8 & branch for #259:

The CustomResourceDefinition "humioclusters.core.humio.com" is invalid: spec.validation.openAPIV3Schema.properties[spec].properties[sidecarContainer].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property

kindest/node:v1.19.1 & branch for #259:

Warning: apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
The CustomResourceDefinition "humioclusters.core.humio.com" is invalid: spec.validation.openAPIV3Schema.properties[spec].properties[sidecarContainer].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property

Upgrading controller-gen seems to work, but there's currently not a release that includes this fix yet.

@Crevil
Copy link
Contributor

Crevil commented Nov 12, 2020

Is this the source of failures in #257 ?

@SaaldjorMike
Copy link
Member Author

Is this the source of failures in #257 ?

Doesn't look like it. The E2E logs in GitHub Actions for #257 shows this when installing the CRD's:

+ kubectl --kubeconfig /tmp/kubeconfig apply -k config/crd/
Warning: apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
customresourcedefinition.apiextensions.k8s.io/humioclusters.core.humio.com created
customresourcedefinition.apiextensions.k8s.io/humioexternalclusters.core.humio.com created
customresourcedefinition.apiextensions.k8s.io/humioingesttokens.core.humio.com created
customresourcedefinition.apiextensions.k8s.io/humioparsers.core.humio.com created
customresourcedefinition.apiextensions.k8s.io/humiorepositories.core.humio.com created
customresourcedefinition.apiextensions.k8s.io/humioviews.core.humio.com created

Unfortunately I don't have time to dig through the logs for #257 today.

@SaaldjorMike
Copy link
Member Author

Fixed as part of #259.

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

No branches or pull requests

2 participants