You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is probably due to the refactor of the password cache ( #1756 ) cc. @schroeder-paul / @MisterMX . It seems the Cache namespace is not fetching the namespace from "masterUserPasswordSecretRef", so the fix seems to be something simple.
@WolfGanGeRTech the masterUserPasswordSecretRef is optional and must not be provided when using the manageMasterUserPassword option (my case) .
So I guess the namespace for the password caching must be provided in another way.
I've worked around this problem by creating the artificial namespace crossplane-system in the target cluster as my Crossplane is installed in the crossplane ns.
Anyways it's a bug.
While it may seem trivial, this issue is not so easy to resolve as it may seem at first glance. Some heads-up thought:
masterUserPasswordSecretRef is indeed an optional field. The last used password is stored in a cache secret. It is not something that should be specified for MR individually since it is only provider internal. #1756 was written with the assumption that providers are always running in the crossplane-system namespace, so it got hardcoded.
However, it is not so easy to dynamically resolve the namespace to be used since controller-runtime's Client provides no direct way to get the default namespace from a config.
To solve this issue we need to lookup the target namespace manually. There are a bunch of possible locations to fetch it from:
POD_NAMESPACE env var
local kubeconfig context
--namespace CLI arg (we already have that one but it is used in a different way)
After we retrieved the namespace, we need to set it at the cache secret in the controller. It can be done directly via secret.SetNamespace or making it more abstract by using a client.NewNamespacedClient wrapper.
What happened?
After the upgrade for version 0.42 I am not able to create new RDS due to error:
This is probably due to the refactor of the password cache ( #1756 ) cc. @schroeder-paul / @MisterMX . It seems the Cache namespace is not fetching the namespace from "masterUserPasswordSecretRef", so the fix seems to be something simple.
I am using:
So, I guess Crossplane should use that namespace for caching.
How can we reproduce it?
Here is the manifest applied
What environment did it happen in?
Crossplane version: 0.42
Thanks for the help! :)
The text was updated successfully, but these errors were encountered: