seldon-core icon indicating copy to clipboard operation
seldon-core copied to clipboard

Seldon controller name is hardcoded and does not allow deployments with different names

Open DomFleischmann opened this issue 4 years ago • 0 comments

Describe the bug

When deploying the seldon controller manager with a different name than seldon-controller-manager, the deployment fails due to this name being hardcoded here.

This is an issue for operators that want to offer a customizable experience where you would like to deploy seldon with different names. An example for an operator like this is our seldon-core-operator used in Canonicals MLOps solution.

To reproduce with out operator

# Ubuntu 20.04 machine
sudo snap install microk8s --classic --channel=1.21/stable
sudo snap install juju --classic
sudo usermod -a -G microk8s ubuntu
sudo chown -f -R ubuntu ~/.kube
newgrp microk8s
microk8s enable storage dns
microk8s status --wait-ready
juju bootstrap microk8s 
juju add-model seldon
juju deploy seldon-core

After some time, checking with juju status the deployment will fail with a container error. When reading the logs of the deployed pod the following error appears:

$ microk8s kubectl -n seldon logs pod/seldon-core-57778474cf-b7vw2
{"level":"info","ts":1636625946.6306317,"logger":"setup","msg":"Intializing operator"}
{"level":"error","ts":1636625946.7374682,"logger":"setup","msg":"unable to initialise operator","error":"deployments.apps \"seldon-controller-manager\" not found","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/pkg/mod/github.com/go-logr/[email protected]/zapr.go:128\nmain.main\n\t/workspace/main.go:149\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203"

Expected behaviour

The pod name should be configurable through some environment variable or something else, instead of having it hardcoded to seldon-controller-manager.

DomFleischmann avatar Nov 11 '21 10:11 DomFleischmann