boundless-lifeguard-61788
01/28/2025, 9:35 PMboundless-lifeguard-61788
01/28/2025, 10:09 PMboundless-lifeguard-61788
01/28/2025, 10:10 PMapiVersion: v1
kind: PodTemplate
metadata:
name: pod-template
template:
metadata:
name: pod-template
spec:
initContainers:
- name: init
image: alpine
command:
....
boundless-lifeguard-61788
01/29/2025, 12:14 AMspec:
initContainers:
- name: default-init
clean-glass-36808
01/29/2025, 12:42 AMboundless-lifeguard-61788
01/29/2025, 1:12 AMboundless-lifeguard-61788
01/29/2025, 1:14 AMboundless-lifeguard-61788
01/29/2025, 1:15 AMplugins = {
k8s = {
default-pod-template-name = "pod-template"
}
}
freezing-airport-6809
freezing-airport-6809
clean-glass-36808
01/29/2025, 2:30 AMclean-glass-36808
01/29/2025, 2:32 AMclean-glass-36808
01/29/2025, 6:22 AMboundless-lifeguard-61788
01/29/2025, 3:30 PMboundless-lifeguard-61788
01/29/2025, 3:33 PMapiVersion: v1
kind: PodTemplate
metadata:
name: pod-template
template:
metadata:
name: pod-template
spec:
initContainers:
- name: default-init
image: alpine
command:
args:
volumeMounts:
- name:
mountPath:
containers:
- name: default
image: rwgrim/docker-noop
volumeMounts:
- name:
mountPath:
terminationMessagePath: /dev/foo
volumes:
- name:
ephemeral:
volumeClaimTemplate:
spec:
...
clean-glass-36808
01/29/2025, 4:32 PM---
apiVersion: v1
kind: PodTemplate
metadata:
name: flyte-template
namespace: example
template:
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "<http://example.com/compute|example.com/compute>"
operator: In
values:
- non-gpu
tolerations:
- key: "<http://example.com/compute|example.com/compute>"
operator: "Equal"
effect: "NoSchedule"
value: "true"
initContainers:
- name: default-init
image: <http://docker.io/rwgrim/docker-noop|docker.io/rwgrim/docker-noop>
env:
- name: AWS_ENDPOINT_URL
value: "example"
- name: AWS_CA_BUNDLE
value: /etc/ssl/certs/bundle.crt
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: "example"
key: access-key-id
volumeMounts:
- name: stack-cert-bundle
mountPath: /etc/ssl/certs
readOnly: true
...
boundless-lifeguard-61788
01/29/2025, 4:58 PMplugins.k8
and clusterResourceTemplates.inline
boundless-lifeguard-61788
01/29/2025, 5:05 PMboundless-lifeguard-61788
01/29/2025, 5:21 PMclean-glass-36808
01/29/2025, 6:08 PMflyte-core:
flyte-propeller:
copilot:
plugins:
k8s:
default-pod-template-name: flyte-template
I'll have to look into the cluster resource template and the k8s plugin to see how those workboundless-lifeguard-61788
01/29/2025, 6:15 PMboundless-lifeguard-61788
01/29/2025, 6:17 PMconfiguration.inline.plugins.k8.default-pod-template-name
clean-glass-36808
01/29/2025, 6:19 PMboundless-lifeguard-61788
01/29/2025, 6:24 PMboundless-lifeguard-61788
01/29/2025, 6:25 PMclean-glass-36808
01/29/2025, 6:26 PMclean-glass-36808
01/29/2025, 6:27 PMclean-glass-36808
01/29/2025, 6:39 PMIn this scheme, if the default PodTemplate contains a container with the name "default", that container will be used as the base configuration for all containers Flyte constructs
Since Flyte is not generating any init containers, your pod template does not match any init containers, and that is why in v1.14 you're seeing them get wiped out: https://github.com/flyteorg/flyte/blob/448aba97201ba42297282d859e6064b7f89537ae/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go#L6[…]84
Earlier versions of Flyte unconditionally used the pod template init containers verbatim.
So I think if you want your tasks to have an init container (in v1.14) you'd drop the default pod template and move to using compile time pod templates: https://docs.flyte.org/en/latest/deployment/configuration/general.html#compile-time-podtemplatesboundless-lifeguard-61788
01/29/2025, 6:42 PMclean-glass-36808
01/29/2025, 6:43 PMboundless-lifeguard-61788
01/29/2025, 6:45 PMclean-glass-36808
01/29/2025, 6:55 PMaverage-finland-92144
01/30/2025, 7:06 PMclean-glass-36808
01/30/2025, 7:14 PMclean-glass-36808
01/30/2025, 7:14 PMboundless-lifeguard-61788
01/30/2025, 8:10 PMboundless-lifeguard-61788
01/30/2025, 9:53 PM