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

[backend] Cannot inject environment variables and volumes into components with the KFP CLI #9924

Closed
b-feldmann opened this issue Aug 23, 2023 · 3 comments
Labels
area/backend kind/bug lifecycle/stale The issue / pull request is stale, any activities remove this label.

Comments

@b-feldmann
Copy link

Environment

  • How did you deploy Kubeflow Pipelines (KFP)?
    Full Kubeflow Deployment

  • KFP version: 1.7.0 (we are using Kubeflow 1.7.0)

  • KFP SDK version: 2.0.1

Steps to reproduce

The injection of environment variables and secrets into components is not working correctly with kfpv2. Please look below for the python code and the generated yaml.

We could use volumes and environment variables in KFPv1 but when updating to kfpv2 and Kubeflow 1.7 the (updated) code does not work anymore. The Pipeline yaml looks fine from our perspective but in Kubernetes the pipeline component pod does not get the required configurations. (volume mount, env)

Expected result

The Kubernetes Pod has access to the volumes and environment variables and we can use them inside a Kubeflow pipeline component.

Materials and Reference

We are using this to add the secret in the kfp cli.

def add_gsc_access(task):
    task.set_env_variable(
        name="GOOGLE_APPLICATION_CREDENTIALS", value="/var/secrets/google/key.json"
    )

    kubernetes.use_secret_as_volume(
        task,
        secret_name="pubsub-key",
        mount_path="/var/secrets/google",
    )

Generated Pipeline YAML:

components:
  comp-download-from-gcs:
    executorLabel: exec-download-from-gcs
    inputDefinitions:
      parameters:
        gcs_path:
          parameterType: STRING
    outputDefinitions:
      artifacts:
        data:
          artifactType:
            schemaTitle: system.Artifact
            schemaVersion: 0.0.1
...
deploymentSpec:
  executors:
    exec-download-from-gcs:
      container:
        command:
        - ...

Impacted by this bug? Give it a 👍.

@X-Siro
Copy link

X-Siro commented Oct 26, 2023

Similar issue with container_component and kubernetes.use_secret_as_env

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the lifecycle/stale The issue / pull request is stale, any activities remove this label. label Jan 25, 2024
Copy link

This issue has been automatically closed because it has not had recent activity. Please comment "/reopen" to reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/backend kind/bug lifecycle/stale The issue / pull request is stale, any activities remove this label.
Projects
No open projects
Status: Closed
Development

No branches or pull requests

2 participants