Matheus Moreno
04/06/2022, 4:16 PMflytectl.current_context().secrets.get()
with a Secret mounted as a file, the get_secrets_file()
method here searches for it using
return os.path.join(self._base_dir, group.lower(), f"{self._file_prefix}{key.lower()}")
The thing is, Kubernetes mounts secret files without changing the case of letters. Therefore, if I call flytectl.current_context().secrets.get('mlflow-credentials', 'MLFLOW_TRACKING_URI')
, the Secrets Manager is unable to find this secret, even though its present on /etc/flyte/secrets/mlflow-credentials/MLFLOW_TRACKING_URI
. I think this is a problem on the Kubernetes side, right? Because I just checked that secrets requested as environment variables are passed with all upper case, even though the key is lower case.
I was even opening a PR on flyteorg/flytekit
removing the .upper()
and .lower()
calls on the Secret Manager, but, again, I'm not sure if this is a problem on the SDK side or on the server side.Ketan (kumare3)