Add support for initContainers in ServingRuntime spec
funbiscuit opened this issue · 0 comments
Is your feature request related to a problem? If so, please describe.
Currently in ServingRuntime spec we can specify list of containers for created pods. But sometimes it's necessary to run some initialization logic so we need to use initContainers. Unfortunately ServingRuntime spec doesn't support this.
Describe your proposed solution
Add support of k8s init containers to ServingRuntime spec under field spec.initContainers. It should be the same as initContainers of usual k8s pod spec.
Describe alternatives you have considered
Alternatively we can do init logic in python scripts that load model, but this is not always easy.
Additional context
In my project we store some extra python modules inside external git repo so we need to perform initial cloning of git repo prior to launching serving runtime. Otherwise we have to check and wait inside load method to ensure that modules are available.