Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove helper method to set image pull policy #11

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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