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

Flagd no longer watches for changes to flagd configmap #1953

Open
sjkaris opened this issue Jan 24, 2025 · 1 comment
Open

Flagd no longer watches for changes to flagd configmap #1953

sjkaris opened this issue Jan 24, 2025 · 1 comment

Comments

@sjkaris
Copy link

sjkaris commented Jan 24, 2025

Bug Report

Which version of the demo you are using?
1.12.0

Symptom

After launch of the flagd ui, the flagd container no longer watches or updates based on changes made to its configmap.

What is the expected behavior?
What do you expect to see?

I expect flagd to continue to respect changes made to the configmap. So that if a flag is adjusted in the flagd configmap, that change is propagated to the flagd container and the rest of the demo services.
Ideally, changes made in the flagdui are also persisted back to the configmap.

What is the actual behavior?

Changes to the configmap only get applied if the flagd pod is redeployed / restarted.

Reproduce

  1. Make a change to the flagd configmap.
  2. Notice that the flag does not flip in the flagdui and the behavior of the demo does not change.
  3. Restart the flagd deployment
  4. Notice that the flag has flipped

Additional Context

I believe this is somewhat due to the way flagdui interacts with the configmap.
The flagdui only loads the configmap on init, and copies it to a new rw location. code
The flagd container only has access to the rw file. code
This means that changes to the configmap are ignored, and only changes applied through the UI are respected once flagd is running.

@sjkaris sjkaris added the bug Something isn't working label Jan 24, 2025
@puckpuck
Copy link
Contributor

Live updates from flagd-ui back into the ConfigMap would require leveraging the K8s API which is beyond the scope of what the UI should do.

When we added the flagd-ui, we did so intentionally, knowing that setting default flags would no longer be possible unless someone forks the Helm Chart. I think a valid enhancement for the Helm chart would be to add the ability to set default flag values.

Given the current architecture with the flagd-ui however, it would not be possible to manually update the ConfigMap and have it be live reloaded. If changing the ConfigMap manually, you will need to restart the flagd Pod for the changes to take effect.

@puckpuck puckpuck removed the bug Something isn't working label Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants