Matheus Moreno

04/06/2022, 4:16 PM
Hi, everyone. While using Secrets on Flytekit, I stumbled upon a bug. When I use
with a Secret mounted as a file, the
method here searches for it using
Copy code
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
. 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
removing the
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)

04/06/2022, 5:09 PM
this is weird
cc @Haytham Abuelfutuh i dont know if we call this a bug in k8s or intended behavior
maybe, we should ignore case?