You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A follow up. Adding x-kubernetes-embedded-resource: true won't work for us because it makes the SeldonPodSpec require more fields that we probably don't want to start enforcing. These are apiVersion and kind. Example validation error from my dummy example:
error: error validating "/home/ivan/code/kubernetes/cmd/kubectl/test-foo.json": error validating data: [ValidationError(Foo.spec.predictors[0].componentSpecs[0]): missing required field "apiVersion" in io.k8s.samplecontroller.v1.Foo.spec.predictors.componentSpecs, ValidationError(Foo.spec.predictors[1].componentSpecs[0]): missing required field "kind" in io.k8s.samplecontroller.v1.Foo.spec.predictors.componentSpecs, ValidationError(Foo.spec.predictors[1].componentSpecs[0]): missing required field "apiVersion" in io.k8s.samplecontroller.v1.Foo.spec.predictors.componentSpecs];
1. does not change anything other than the validation of the resources. 2. changes the metadata field in the SeldonPodSpec which could potentially affect people who are depending on this field in their own projects. The changes to the operator here were minimal to make it work with the new metadata field.
Describe the bug
When deploying a seldon deployment the metadata fields of predictor's component spec do not get persisted in k8s.
This seems to occur only when using the CRDs with
apiextensions.k8s.io/v1
as per the docs unknown fields will be pruned.The metadata field here https://github.com/SeldonIO/seldon-core/blob/master/operator/apis/machinelearning.seldon.io/v1/seldondeployment_types.go#L292 is probably not recognized when generating the CRDs.
Possible solutions:
x-kubernetes-preserve-unknown-fields: true
to that field. This will eventually be deprecated so we should probably avoid it.properties:
block. Probably there is a better way.Is there a chance other fields are also affected and not only the SeldonPodSpec's metadata?
To reproduce
Expected behaviour
The metadata field in the component spec should contain the original fields:
Environment
The text was updated successfully, but these errors were encountered: