Skip to content

Commit

Permalink
Merge pull request #11 from rkpattnaik780/fix_img_policy
Browse files Browse the repository at this point in the history
fix: remove helper method to set image pull policy
  • Loading branch information
harshad16 committed Apr 9, 2024
2 parents 39184f6 + c69c791 commit 1b41943
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions elyra/templates/kubeflow/v2/python_dsl_template.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,6 @@ def add_pod_annotation(

return task

def set_image_pull_policy(task: PipelineTask, policy: str) -> PipelineTask:

if policy not in ['Always', 'Never', 'IfNotPresent']:
raise ValueError(
'Invalid imagePullPolicy. Must be one of `Always`, `Never`, `IfNotPresent`.'
)
msg = common.get_existing_kubernetes_config_as_message(task)
msg.image_pull_policy = policy
task.platform_config['kubernetes'] = json_format.MessageToDict(msg)

return task

# ------------------------------------------------------------------
# end of missing functions
# ------------------------------------------------------------------
Expand Down Expand Up @@ -128,9 +116,6 @@ def generated_pipeline(
{% endif %}
{% endfor %}
)
{% if workflow_task.task_modifiers.image_pull_policy %}
set_image_pull_policy({{ task_name }}, "{{ workflow_task.task_modifiers.image_pull_policy }}")
{% endif %}
{% if workflow_task.task_modifiers.object_storage_secret %}
secret.use_secret_as_env({{ task_name }}, "{{ workflow_task.task_modifiers.object_storage_secret }}", { "AWS_ACCESS_KEY_ID": "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY": "AWS_SECRET_ACCESS_KEY" })
{% endif %}
Expand Down

0 comments on commit 1b41943

Please sign in to comment.