:wave: having some issues trying to add an init co...
# flyte-support
g
šŸ‘‹ having some issues trying to add an init container via pod template, curious if anyone has done this before or have any insights! • I currently create a
PodTemplate
resource in our cluster, and added an item to
initContainers
within the
spec
• I use
pod_template_name
in the task decorator to route it to the above resource • I additionally specify another template via
pod_template
in the task decorator, just to add some extra tolerations • and when I launch the task, I do see its pod get most of the fields from the
PodTemplate
resource like the volumes and mounts, but it just doesn't seem to merge in the
initContainers
I was referring to the flyte doc about podtemplates and it does have some examples where we're able to specify
initContainers
with arbitrary names
that doc also writes about specifying init containers with names
default-init
and
primary-init
, but it sounds like it's for modifying init containers that will already be added, rather than for adding a new init container
g
@shy-student-98060 mind taking a look
šŸ™ 1
šŸ‘Œ 1
c
I don't believe you can add containers by referring to an existing
pod_template
. You might be able to add containers by specifying a
pod_template
in the task decorator.
g
gotcha, that's interesting - for more context, we want to add an init container to all pods that Flyte creates for tasks, so doing it via the task decorator isn't too ideal
hmm does that mean there's just no way in Flyte atm to add custom init containers to all tasks?
maybe I can create a feature request ticket in that case