Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Add support for GCP secret manager #547

Merged
merged 3 commits into from
Mar 31, 2023
Merged

Conversation

jeevb
Copy link
Contributor

@jeevb jeevb commented Mar 30, 2023

Tested with:

from flytekit import Secret, task, workflow


@task(secret_requests=[Secret(group="mainsecret", key="na", group_version="1")])
def secret_task() -> str:
    with open("/etc/flyte/secrets/mainsecret/1") as f:
        return f.read()


@workflow
def wf() -> str:
    x = secret_task()
    return x

Screenshot 2023-03-30 at 2 03 25 PM

Note the use of the required key, even though the secrets plugin does not use it. @wild-endeavor: we may want to consider making this optional. Flytekit will also need support for including the group version in the file path when fetching secrets.

@codecov
Copy link

codecov bot commented Mar 30, 2023

Codecov Report

Merging #547 (b1e6b2b) into master (01218d2) will increase coverage by 0.64%.
The diff coverage is 86.25%.

❗ Current head b1e6b2b differs from pull request most recent head 54372c6. Consider uploading reports for the commit 54372c6 to get more accurate results

Signed-off-by: Jeev B <jeevb@users.noreply.github.com>
@jeevb jeevb marked this pull request as ready for review March 30, 2023 21:13
wild-endeavor
wild-endeavor previously approved these changes Mar 30, 2023
EngHabu
EngHabu previously approved these changes Mar 30, 2023
Copy link
Contributor

@EngHabu EngHabu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥳 awesome! thank you, @jeevb

Signed-off-by: Jeev B <jeevb@users.noreply.github.com>
@wild-endeavor wild-endeavor merged commit f88f165 into master Mar 31, 2023
@wild-endeavor wild-endeavor deleted the jeev/gcp-secret-manager branch March 31, 2023 00:57
eapolinario pushed a commit to eapolinario/flytepropeller that referenced this pull request Aug 9, 2023
Signed-off-by: Jeev B <jeevb@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants