Is it possible to watch for config changes on K8S secret? #1859
Unanswered
LinMoskovitch
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I have a Kubernetes secret in my cluster that contains the configuration for my application. I am trying to use WatchConfig to detect and apply changes made within this secret.
Despite my efforts, I am unable to watch and apply the configuration changes. When I change the value in my secret, nothing happens in my code. For example, I tried to change the log level from "error" to "info" (the log level is defined in my secret), but the application continues to use the "error" log level and does not print info-level logs.
Here's what I have done so far:
Set up WatchConfig in my Viper configuration.
Modified the secret to update the log level.
However, the application does not detect or apply the changes. I am looking to understand if it is possible to watch for changes in a Kubernetes secret using Viper’s WatchConfig, and if so, how to achieve this effectively.
Any insights or suggestions would be greatly appreciated.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions