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

[feature] add imagePullSecrets in the pipeline level #11498

Open
revit13 opened this issue Jan 3, 2025 · 1 comment
Open

[feature] add imagePullSecrets in the pipeline level #11498

revit13 opened this issue Jan 3, 2025 · 1 comment

Comments

@revit13
Copy link
Contributor

revit13 commented Jan 3, 2025

What feature would you like to see?

define imagePullSecrets for KFP v2 in the pipeline level as in KFP v1:
dsl.get_pipeline_conf().set_image_pull_secrets([k8s_client.V1ObjectReference(name="secret-name")])

Related issue: #11112

What is the use case or pain point?

It is more convenient to set it once at the pipeline level rather than defining it separately for each component.

Is there a workaround currently?

Yes, imagePullSecrets can be set for each componen separately.

Also, the following workaround does not work:
When using a pipeline wrapper as in the following example I get an error: ValueError: Platform-specific features can only be set on primitive components. Found platform-specific feature set on a pipeline.

from kfp import dsl
from kfp import kubernetes

@dsl.component
def print1():
    print("hello")


@dsl.pipeline(name='test')
def test_pipeline():
    print_task = print1()

@dsl.pipeline(name='wrapper')
def wrapper_pipeline_pipeline():
    task = test_pipeline()
    kubernetes.set_image_pull_secrets(task, ['secret-name'])

Love this idea? Give it a 👍.

@roytman
Copy link
Contributor

roytman commented Jan 5, 2025

P.S. The option to set kubernetes.set_image_pull_policy at the pipeline level, with the flexibility to override it for individual components, can also be very useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants