vmware-archive / kubecfg

A tool for managing complex enterprise Kubernetes environments as code.
Apache License 2.0
727 stars 62 forks source link

Cant' get kubecfg to validate CRD from cert-manager #295

Open nabadger opened 3 years ago

nabadger commented 3 years ago

I'm not entirely sure if this is a cert-manager issue or kubecfg issue.

wget https://raw.githubusercontent.com/jetstack/cert-manager/master/deploy/crds/crd-certificates.yaml
kubecfg validate crd-certificates.yaml  

I'm running a local KinD cluster to validate against, and tried both v1.16 and v1.19 kubernetes versions.

kubecfg version: dev-2021-01-21T09:17:21+0000
jsonnet version: v0.15.0
client-go version: v0.0.0-master+$Format:%h$

On the cert-manager side this seemed to fail as soon as they switched to apiextensions.k8s.io/v1

The error seems quite clear but not sure how to resolve it (I've tried updating the manifest to specify number instead of integer, but get the same issue).

Any pointers?

INFO  Validating customresourcedefinitions certificates.cert-manager.io
INFO  validate object "apiextensions.k8s.io/v1, Kind=CustomResourceDefinition"
ERROR Error in customresourcedefinitions certificates.cert-manager.io: ValidationError(v1.CustomResourceDefinition.spec.versions[0].schema.openAPIV3Schema.properties.spec.properties.keySize.maximum): invalid type for io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.maximum: got "integer", expected "number"
ERROR Error in customresourcedefinitions certificates.cert-manager.io: ValidationError(v1.CustomResourceDefinition.spec.versions[0].schema.openAPIV3Schema.properties.spec.properties.keySize.minimum): invalid type for io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.minimum: got "integer", expected "number"
ERROR Error in customresourcedefinitions certificates.cert-manager.io: ValidationError(v1.CustomResourceDefinition.spec.versions[1].schema.openAPIV3Schema.properties.spec.properties.keySize.maximum): invalid type for io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.maximum: got "integer", expected "number"
ERROR Error in customresourcedefinitions certificates.cert-manager.io: ValidationError(v1.CustomResourceDefinition.spec.versions[1].schema.openAPIV3Schema.properties.spec.properties.keySize.minimum): invalid type for io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.minimum: got "integer", expected "number"
ERROR Error in customresourcedefinitions certificates.cert-manager.io: ValidationError(v1.CustomResourceDefinition.spec.versions[2].schema.openAPIV3Schema.properties.spec.properties.privateKey.properties.size.maximum): invalid type for io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.maximum: got "integer", expected "number"
ERROR Error in customresourcedefinitions certificates.cert-manager.io: ValidationError(v1.CustomResourceDefinition.spec.versions[2].schema.openAPIV3Schema.properties.spec.properties.privateKey.properties.size.minimum): invalid type for io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.minimum: got "integer", expected "number"
ERROR Error in customresourcedefinitions certificates.cert-manager.io: ValidationError(v1.CustomResourceDefinition.spec.versions[3].schema.openAPIV3Schema.properties.spec.properties.privateKey.properties.size.maximum): invalid type for io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.maximum: got "integer", expected "number"
ERROR Error in customresourcedefinitions certificates.cert-manager.io: ValidationError(v1.CustomResourceDefinition.spec.versions[3].schema.openAPIV3Schema.properties.spec.properties.privateKey.properties.size.minimum): invalid type for io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps.minimum: got "integer", expected "number"
ERROR Validation failed