seldon-core
seldon-core copied to clipboard
SeldonV2 - Ability to set component level labels/annotations in SeldonConfig/SeldonRuntime
I noticed that both SeldonConfig and SeldonRuntime Custom Resources use v1.PodSpec to define podSpec for the components, and re-use the Annotations/Metadata set in the CustomResource in the Pod spec within Deployment/Statefulset.
References: a) https://github.com/SeldonIO/seldon-core/blob/v2.6.0/operator/controllers/reconcilers/seldon/deployment_reconciler.go#L54..L55 b) https://github.com/SeldonIO/seldon-core/blob/60b7401ae5052ccf183c1453575611085bca4bb3/operator/controllers/reconcilers/seldon/statefulset_reconciler.go#L89..L90
Looking at this I understand there is no provision to set component specific labels - For example, if I wanted to set some custom labels/annotations for the seldon-scheduler, and some different labels/annotations for Envoy, I could not find a way to do so.
My goal is to be able to run all the Pods (except Envoy) defined in SeldonV2 Runtime definition within Istio Service Mesh (i.e. inject istio sidecar). One option I considered was to add the Istio labels/annotations to the CustomResource definition but then I would not be able to selectively prevent istio-proxy injection to the Envoy pod.
Could you please provide guidance for this?