-
Notifications
You must be signed in to change notification settings - Fork 835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ability to specify init container on per deployment basis #2611
Comments
You can add your own initContainer in the connected PodSpec. But if you are using a prepackaged server you will still get its initContainer added by default which may conflict. |
Actually, tested it just now and I only got one init container with prepackaged server. This is most probably because name matched the pattern. The example I came up with is apiVersion: machinelearning.seldon.io/v1
kind: SeldonDeployment
metadata:
name: example-test
spec:
name: iris
predictors:
- componentSpecs:
- spec:
containers:
- name: classifier
volumeMounts:
- mountPath: /mnt/models
name: classifier-provision-location
readOnly: true
initContainers:
- name: classifier-model-initializer
image: rafalskolasinski/storage-initializer:v0.4.0
imagePullPolicy: IfNotPresent
args:
- s3://sklearn/iris
- /mnt/models
envFrom:
- secretRef:
name: seldon-init-container-secret
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /mnt/models
name: classifier-provision-location
volumes:
- emptyDir: {}
name: classifier-provision-location
graph:
children: []
implementation: SKLEARN_SERVER
modelUri: s3://sklearn/iris
name: classifier
name: default
replicas: 1 (which only customises the secret and image) |
Adding above example as part of #2055 should solve this issue. |
Thinking about it more, we should consider this issue close only when it will be possible to specify image used for initContainer per deployment in a more elegant fashion than above. |
To be precise, I would like to allow users to be able to specify a following apiVersion: machinelearning.seldon.io/v1
kind: SeldonDeployment
metadata:
name: custom-init-image
spec:
name: iris
predictors:
- componentSpecs:
- spec:
initContainers:
- name: classifier-model-initializer
image: seldonio/storage-initializer:v1.6.0
graph:
implementation: SKLEARN_SERVER
modelUri: gs://seldon-models/sklearn/iris
name: classifier
name: default
replicas: 1 With the assumption that all valid init container images provided these way would take two arguments:
|
This should in principle work like this but currently operator fails to create a proper deployments: #2821 |
closed by #2937 |
Currently init containers can only be specified globally. It would be good if one can specify init container on per deployment basis.
The text was updated successfully, but these errors were encountered: