Klemens Kasseroller
06/28/2023, 8:44 AMapiVersion: v1
kind: PodTemplate
metadata:
name: my-pod-template
namespace: flyte
template:
metadata:
labels:
pod-template-name: my-pod-template
pod-template-namespace: flyte
spec:
containers:
- name: default
image: <http://docker.io/rwgrim/docker-noop|docker.io/rwgrim/docker-noop>
volumeMounts:
- name: mnt-volume
mountPath: /mnt
volumes:
- name: mnt-volume
hostPath:
path: /mnt
And trying to reference this pod template on the client side with:
@task(pod_template_name="my-pod-template")
def print_files() -> None:
print(os.listdir("/mnt"))
But the task immediately errors out with PodTemplate does not exist
My flyte deployment is on version 1.3 and flytekit on version 1.2.11.
Is there anything I am missing or do I need different flyte versions?
I was trying the same using PodSpec (flytekitplugins-pod) which worked fine.Tommy Nam
06/28/2023, 8:57 AMclusterResourceTemplates:
inline:
001_namespace.yaml: |
apiVersion: v1
kind: Namespace
metadata:
name: '{{ namespace }}'
103_project_efs_shared.yaml: |
apiVersion: v1
kind: PodTemplate
metadata:
name: flyte-template-name
namespace: {{ namespace }}
template:
spec:
containers:
- name: default
image: imagehere
volumeMounts:
- mountPath: /shared
name: {{ namespace }}-shared-mount-name
volumes:
- name: {{ namespace }}-shared-mount-name
persistentVolumeClaim:
claimName: {{ namespace }}-shared-mount-name
You will probably also have to add PVC and PV resources to clusterresourcetemplates on a namespace level as well to mount the path in the containers/podsKlemens Kasseroller
06/28/2023, 9:04 AMKetan (kumare3)
Klemens Kasseroller
06/28/2023, 1:53 PMKetan (kumare3)
Klemens Kasseroller
06/28/2023, 2:12 PMplugins:
k8s:
default-pod-template-name: <your_template_name>
I cannot find them here: https://artifacthub.io/packages/helm/flyte/flyte-binary/1.6.2
Am I looking at the wrong place 🤔plugins:
k8s:
default-pod-template-name: <my-template>
I cannot find a way to configure this in the values.yaml for the flyte binary chart (https://artifacthub.io/packages/helm/flyte/flyte-binary/1.6.2?modal=template&template=configmap.yaml)David Espejo (he/him)
06/28/2023, 6:24 PMinline
?
inline:
plugins:
k8s:
default-pod-template-name: <my-template>
It should merge with the base configKlemens Kasseroller
06/29/2023, 5:37 AM