Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve defaulting to reloadable token in k8s so it shows correctly in config dump #12786

Open
lahabana opened this issue Feb 7, 2025 · 0 comments
Labels
kind/bug A bug triage/accepted The issue was reviewed and is complete enough to start working on it

Comments

@lahabana
Copy link
Contributor

lahabana commented Feb 7, 2025

Kuma Version

master

Describe the bug

When running on k8s KUMA_DP_SERVER_AUTHN_ENABLE_RELOADABLE_TOKENS is always true however, on startup the config dump shows that it's off.

To Reproduce

No response

Expected behavior

No response

Additional context (optional)

On k8s we set this config to true always:

EnableReloadableTokens bool `json:"enableReloadableTokens" envconfig:"kuma_dp_server_authn_enable_reloadable_tokens"`

We do it in:

rt.Config().DpServer.Authn.EnableReloadableTokens || rt.Config().Store.Type == store.KubernetesStore,

This works but when we log the config:

cfgForDisplay, err := config.ConfigForDisplay(&cfg)
if err != nil {
runLog.Error(err, "unable to prepare config for display, log config will be empty")
}
runLog.Info("starting Control Plane", "version", kuma_version.Build.Version, "mode", cfg.Mode, "config", cfgForDisplay)

It shows as false as this is not done in the right place.
We should instead use PostProcess:

PostProcess() error

which does the same but at a more suitable place:

return l.postProcess()

@lahabana lahabana added kind/bug A bug triage/pending This issue will be looked at on the next triage meeting labels Feb 7, 2025
@lukidzi lukidzi added triage/accepted The issue was reviewed and is complete enough to start working on it and removed triage/pending This issue will be looked at on the next triage meeting labels Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug triage/accepted The issue was reviewed and is complete enough to start working on it
Projects
None yet
Development

No branches or pull requests

2 participants