Hello team! I have pipeline that works well on rem...
# ask-the-community
s
Hello team! I have pipeline that works well on remote. It needs some secrets and task get this secrets like
Copy code
@task(secret_requests=[Secret(group="SOME_SECRET", key="DATA")])
def some_task() -> None:
  ...
  os.environ["SOME_SECRET_DATA"] = flytekit.current_context().secrets.get("SOME_SECRET", "DATA")
  ...
It works fine on remote because k8s secrets are already set. However, it doesn’t works on local with command
pyflyte run …
. When I use SecretsManager under
if __name__ == "__main__"
clause and run with
python pipeline.py
it works. But I want to make this pipeline works with
pyflyte run …
command.
s
Have you had a chance to go through https://docs.flyte.org/projects/cookbook/en/latest/auto/core/containerization/use_secrets.html#secret-discovery section? You'll need to set some environment variables to make it work.