vshn / appcat-service-postgresql

AppCat Service Provider for PostgreSQL
https://vshn.github.io/appcat-service-postgresql/
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Make the major version selector immutable #35

Closed ccremer closed 2 years ago

ccremer commented 2 years ago

Summary

Checklist

ccremer commented 2 years ago

In order to actually test this feature in local cluster, in https://github.com/vshn/appcat-service-postgresql/blob/c267a0eade0ec65e7d7547080fd694d2f05c2d1f/apis/postgresql/v1alpha1/postgresql_standalone_types.go#L24 add ;v15 after v14 and run make generate. Then run make local-install install-samples. To trigger the error, run kubectl edit postgresqlstandalone my-instance, change v14 to v15 and try to safe/apply the resource.

Without adding another value to the Enum in the kubebuilder comment, the apply fails before it's sent to the webhook, because the Schema isn't valid in the first place.