k8s - configmap adds watch for all available configmap in the namespace.
See original GitHub issueDescribe the bug
Version 2.0.1
apps needs only configmap injection so included only implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-kubernetes-client-config'
and bootstarp.yml config as follows
spring:
application:
name: my-test-app
cloud:
loadbalancer:
cache:
enabled: false
kubernetes:
enabled: ${KUBERNETES_CONFIG_ENABLED:false}
reload:
enabled: ${KUBERNETES_CONFIG_ENABLED:false}
config:
enabled: ${KUBERNETES_CONFIG_ENABLED:false}
name: ${SPRING_APPLICATION_NAME:unknown}
namespace: default
discovery:
enabled: false
loadbalancer:
enabled: false
when we start the application we can see logs saying its adding watch for all the configmap that are available in the namespace. we have 1000’s of configmap so worried about any performance issue it may cause.
example
CongifMap app1 was added.
Configuration change was not detected.
CongifMap app2 was added.
Configuration change was not detected.
CongifMap app3 was added.
Configuration change was not detected.
CongifMap app4 was added.
Configuration change was not detected.
CongifMap app5 was added.
Configuration change was not detected.
...
Why not only add watch for configmap that default/mentioned or filter before adding the watch?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:10 (6 by maintainers)
Top Results From Across the Web
ConfigMaps - Kubernetes
A ConfigMap is an API object used to store non-confidential data in key-value pairs. Pods can consume ConfigMaps as environment variables, ...
Read more >Working with kubernetes configmaps, part 2: Watchers - ITNEXT
In this post, I am going to discuss a specific strategy for handling configmaps, namely, using a watcher. Kubernetes API resources all support...
Read more >Kubernetes ConfigMap: Creating, Viewing, Consuming ...
A Kubernetes ConfigMap is an API object that allows you to store data as key-value pairs. Kubernetes pods can use ConfigMaps as configuration...
Read more >An Introduction to Kubernetes Secrets and ConfigMaps
Kubernetes has two types of objects that can inject configuration data into a container when it starts up: Secrets and ConfigMaps.
Read more >Creating & Using ConfigMaps in Kubernetes - BMC Software
ConfigMaps and pods go hand in hand as ConfigMaps can be used as environment variables and configuration information in a Kubernetes pod. In ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sounds good to me
Hi, guess say like that seems fair I’m on vacation at that time, need to check somehow what I said Thanks 😃