-
Task
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
None
Including corev1.ServiceSpec in our SMCPv2 spec causes CRD generation to produce YAML that K8s 1.18+ does not validate, see this issue for reference: https://github.com/kubernetes-sigs/controller-tools/issues/457
The problem is that the validation on CRDs is so strict that it fails on a field in ServiceSpec (it's missing a default value). We have a workaround that adds the default value using sed (https://github.com/maistra/istio-operator/pull/503) but that should be removed as soon as the problem is resolved either in the K8s validation code or in the corev1.ServiceSpec. Another option is to not directly include corev1.ServiceSpec, but copy the code and make the necessary changes locally.