Closed isnuryusuf closed 4 years ago
Hi @isnuryusuf, thank you for this bug report.
I've investigated a little and this issue is rooted deeper. (https://github.com/kubernetes/kubernetes/issues/91395#issuecomment-633261523)
We should update to apiextensions/v1
this will allow defaulting fields in validation schema. Meanwhile, controller-tools should find a way to generate those defaults because right now those are not set (https://github.com/kubernetes-sigs/controller-tools/issues/444).
So even if we will switch for apiextensions/v1
which requires k8s >= 1.16 this will not be fixed without a workaround.
My proposal is to remove validation for Container.Ports
until this is fixed upstream, this is addressed in https://github.com/presslabs/wordpress-operator/pull/74.
https://github.com/kubernetes/kubernetes/pull/92659 should fix this assuming the project decides to accept kubebuilder markers in the API and, as you say, you switch to v1 CRDs.
Is this fixed now? Running
kubectl apply -f https://raw.githubusercontent.com/presslabs/stack/master/deploy/manifests/00-crds.yaml
gives me the same result as @isnuryusuf
@proboxdev not yet, but workaround has been mentioned above i decide to downgrade to v1.17
What happened: Deploying CRD on k8s version 1.18 fail with error:
What you expected to happen: CRD Deploy success
How to reproduce it (as minimally and precisely as possible):
Anything else?: on https://kubernetes.io/docs/setup/release/notes/ Fixed missing validation of uniqueness of list items in lists with x-kubernetes-list-type: map or x-kubernetes-list-type: set` in CustomResources. (#84920, @sttts) [SIG API Machinery]