Gaurav Kumar08/03/2023, 7:30 AM
for securityContext in Container. I have added the PodTemplate in the task as below which includes the image name as well. However, I’m seeing that after executing the workflow, Pod seems to be carrying
for container but the image is set to default image for flyte. What changes do I need to make for this to get my image ?
Code for task definition
After executing the workflow, this is what I found podSpec to be
@task(pod_template=PodTemplate( primary_container_name="primary", pod_spec=client.V1PodSpec( containers=[ client.V1Container( name="primary", image="my-custom-image", security_context=client.V1SecurityContext( privileged=True ) ) ], ) ))
............. image: <http://cr.flyte.org/flyteorg/flytekit:py3.8-1.8.0|cr.flyte.org/flyteorg/flytekit:py3.8-1.8.0> <<<<<<<<< uses default image imagePullPolicy: IfNotPresent name: primary resources: limits: cpu: "2" memory: 200Mi requests: cpu: "2" memory: 200Mi securityContext: privileged: true <<<<<<< Set to True as expected ..........
in the task. But, I want to know why specifying the image in PodTemplate in not getting picked up.
to the task decorator? outside of the podtemplate
Gaurav Kumar08/03/2023, 4:17 PM
I see that my image is getting used if I specifyYes, that’s working for me.in the task. But, I want to know why specifying the image in PodTemplate in not getting picked up.