-
Notifications
You must be signed in to change notification settings - Fork 2k
Feat(spring): Adding FromConfigMap annotation that dynamically maps data config-map to map #1594
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
Feat(spring): Adding FromConfigMap annotation that dynamically maps data config-map to map #1594
Conversation
00380ed
to
36917b1
Compare
...in/java/io/kubernetes/client/spring/extended/manifests/KubernetesFromConfigMapProcessor.java
Outdated
Show resolved
Hide resolved
...n/java/io/kubernetes/client/spring/extended/manifests/configmaps/PollingConfigMapGetter.java
Outdated
Show resolved
Hide resolved
.../java/io/kubernetes/client/spring/extended/controller/KubernetesReconcilerProcessorTest.java
Outdated
Show resolved
Hide resolved
if (configMap == null || configMap.getData() == null) { | ||
return; | ||
} | ||
configMap.getData().keySet().stream().forEach(key -> configMapDataCache.refresh(key)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want an update to be atomic? e.g. it is currently possible that a user could read half the values from ConfigMap v1 and half the values from ConfigMap v2.
This would probably be pretty unexpected from a programmers perspective.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i added a todo comment on the line. am not sure if atomic cache entry update is supported in the cache library for now, we will need that otherwise it wont work
36917b1
to
330cf3b
Compare
4f23070
to
f153a24
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brendandburns, yue9944882 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
example usage: