Open zw0610 opened 2 years ago
anyone knows how to fix it?
cc @pugangxa
There's bunch of this errors like https://github.com/kubernetes/kubernetes/issues/91395 when searched and occur even after I changed to listType=map in https://github.com/kubeflow/common/pull/174 . Either with a type of set or map will add the item as required in schema. Investigated and seems the solution to add defaulter to default the values for the map key. But I don't think it's reasonable to add default value to the condition. Also since there's a lot of this kind of API rule violation which is just a warning but the open api definition is still generated. I will rollback it in https://github.com/kubeflow/common/pull/174
The error is reported from https://github.com/kubernetes/apiextensions-apiserver/blob/e52d5683d8e566b9989f59c09d74bdb0da937981/pkg/apis/apiextensions/validation/validation.go#L852-L861 , I have rollback the changes in https://github.com/kubeflow/common/pull/174 , please take a look.
Have you tried adding // +optional
and omitempty
?
Have you tried adding
// +optional
andomitempty
?
Did a quick test by adding // +optional
and omitempty
, although this can remove condition
from required
in the CRD, but still report this error when applying.
I think there's lots of this api rule violation(before I think it's only this one) during compiling common
so we can leave this for now and address together if needed.
172 breaks training-operator when installing crd
reproduce steps:
change go.mod and go.sum
run
make manifets
Changes not staged for commit: (use "git add..." to update what will be committed)
(use "git restore ..." to discard changes in working directory)
modified: go.mod
modified: go.sum
modified: manifests/base/crds/kubeflow.org_mxjobs.yaml
modified: manifests/base/crds/kubeflow.org_pytorchjobs.yaml
modified: manifests/base/crds/kubeflow.org_tfjobs.yaml
modified: manifests/base/crds/kubeflow.org_xgboostjobs.yaml
no changes added to commit (use "git add" and/or "git commit -a")