question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

k8s - configmap adds watch for all available configmap in the namespace.

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ryanjbaxtercommented, Jul 8, 2022

Sounds good to me

0reactions
UnleashSpiritcommented, Aug 26, 2022

Hi, guess say like that seems fair I’m on vacation at that time, need to check somehow what I said Thanks 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found