-
Notifications
You must be signed in to change notification settings - Fork 34
Description
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.