Fredrick
09/27/2022, 7:16 PMContainerTask
as env vars ?
https://docs.flyte.org/projects/cookbook/en/latest/auto/core/containerization/raw_container.htmlYee
mount_requirement
option not working?@task(
secret_requests=[
Secret(
group=SECRET_GROUP,
key=SECRET_NAME,
mount_requirement=Secret.MountType.ENV_VAR,
)
]
)
def secret_file_task() -> Tuple[str, str]:
# SM here is a handle to the secrets manager
sm = flytekit.current_context().secrets
f = sm.get_secrets_file(SECRET_GROUP, SECRET_NAME)
secret_val = sm.get(SECRET_GROUP, SECRET_NAME)
# returning the filename and the secret_val
return f, secret_val
Fredrick
09/27/2022, 8:38 PMsecurity_ctx