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

configmap change is not fired with "reloadOnChange: true" #78

Closed
smartpcr opened this issue May 2, 2019 · 6 comments
Closed

configmap change is not fired with "reloadOnChange: true" #78

smartpcr opened this issue May 2, 2019 · 6 comments

Comments

@smartpcr
Copy link

smartpcr commented May 2, 2019

in sample "ConfigFromConfigMap", change callback is never fired.

@tintoy
Copy link
Owner

tintoy commented May 2, 2019

Hi - thanks for reporting! Will take a look at this tomorrow :)

tintoy added a commit that referenced this issue May 2, 2019
The bug in the sample app was due to a race condition, combined with the fact that change-notification tokens are single-use (each time the notification callback is invoked, you need to request a new token and re-register your callback).

#78
@tintoy
Copy link
Owner

tintoy commented May 2, 2019

Turns out this is due to a combination of factors. The main problem was that change tokens are single-use; once the change callback is invoked, you have to request a new token and re-register your callback.

I've updated the sample, and added logging for the config provider to improve the diagnostic experience :)

Will publish a new build shortly.

@tintoy
Copy link
Owner

tintoy commented May 2, 2019

Published v0.2.12.

@tintoy
Copy link
Owner

tintoy commented May 2, 2019

Can you try out the new version and let me know if it works for you?

@tintoy
Copy link
Owner

tintoy commented May 3, 2019

Published v0.2.13. Turns out I misunderstood how config reloads are supposed to work. I have verified that the updated config is now correct.

Note that, regardless of the config key case used when creating the ConfigMap, K8s transforms the config key names to lower-case for some reason (but the dictionary is case-insensitive so things still work correctly).

tintoy added a commit that referenced this issue May 3, 2019
tintoy added a commit that referenced this issue May 3, 2019
@tintoy
Copy link
Owner

tintoy commented May 20, 2019

Closing #82 (feel free to reopen if you still have this problem).

@tintoy tintoy closed this as completed May 20, 2019
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