tuenti / secrets-manager

A daemon to sync Vault secrets to Kubernetes secrets
Apache License 2.0
171 stars 26 forks source link

Upgrade apiVersion of CRD to v1 instead of v1beta1 #71

Closed user-name-is-taken closed 3 years ago

user-name-is-taken commented 3 years ago

CRDs have been graduated from v1beta1 to v1 in the kubernetes API but not in your CRD.

eduardogr commented 3 years ago

i'll take care of it

raelga commented 3 years ago

Hey @eduardogr, the v1 version introduces some schema changes that need to be addressed.

https://github.com/kubernetes/kubernetes/pull/79604

The `CustomResourceDefinition` API type is promoted to `apiextensions.k8s.io/v1` with the following changes:
* Use of the new `default` feature in validation schemas is limited to v1
* `spec.scope` is no longer defaulted to `Namespaced` and must be explicitly specified
* `spec.version` is removed; use `spec.versions` instead
* `spec.validation` is removed; use `spec.versions[*].schema` instead
* `spec.subresources` is removed; use `spec.versions[*].subresources` instead
* `spec.additionalPrinterColumns` is removed; use `spec.versions[*].additionalPrinterColumns` instead
* `spec.conversion.webhookClientConfig` is moved to `spec.conversion.webhook.clientConfig`
* `spec.conversion.conversionReviewVersions` is moved to `spec.conversion.webhook.conversionReviewVersions`
* `spec.versions[*].schema.openAPIV3Schema` is now required when creating v1 CustomResourceDefinitions
* `spec.preserveUnknownFields: true` is disallowed when creating v1 CustomResourceDefinitions; it must be specified within schema definitions as `x-kubernetes-preserve-unknown-fields: true`
* In `additionalPrinterColumns` items, the `JSONPath` field was renamed to `jsonPath` (fixes https://github.com/kubernetes/kubernetes/issues/66531)

On the other side, the operator is still using v0.2.0-beta.2 from Jun 2019 and that generates still v1beta1. To use v1 as default it also requires also a bump to at least v0.4.0.