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

spring-cloud-kubernetes-config options and autoconfigure not working with reload. #635

Closed
krisiye opened this issue Sep 17, 2020 · 2 comments
Labels
Milestone

Comments

@krisiye
Copy link
Contributor

krisiye commented Sep 17, 2020

Describe the bug

Attempting to configure spring-cloud-kubernetes-config to just add support for kubernetes configMaps. (and disable secrets and discovery client) However would like to support config reload with event. It appears that when bringing up spring boot with the configuration below along with AutoConfigure, we run into a bean resolution issue as posted below.

Sample Configuration

spring:
  cloud:
    kubernetes:
      config:
        enabled: true
      secrets:
        enabled: false
      discovery:
        enabled: false
      reload:
        enabled: true
        monitoring-config-maps: true

Exception:

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cloud.kubernetes.config.reload.ConfigReloadAutoConfiguration$ConfigReloadAutoConfigurationBeans': Unsatisfied dependency expressed through field 'secretsPropertySourceLocator'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.cloud.kubernetes.config.SecretsPropertySourceLocator' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

If the above seems a valid set of configs, Ideally, i would expect the configuration flags that either define or not define a given bean to be honored for autoconfigs as well.

Tested with:

Spring Boot: 2.3.3.RELEASE
spring-cloud-kubernetes-config: 1.1.3.RELEASE
krisiye added a commit to krisiye/spring-cloud-kubernetes that referenced this issue Sep 18, 2020
…m optional dependencies for reload auto config as they could be enabled/disabled through config independent of each other. Fixes spring-cloud#635
krisiye added a commit to krisiye/spring-cloud-kubernetes that referenced this issue Sep 18, 2020
@krisiye krisiye mentioned this issue Sep 18, 2020
@ryanjbaxter ryanjbaxter added this to the 1.1.9.RELEASE milestone Sep 21, 2020
krisiye added a commit to krisiye/spring-cloud-kubernetes that referenced this issue Sep 21, 2020
…m optional dependencies for reload auto config as they could be enabled/disabled through config independent of each other. Fixes spring-cloud#635
@krisiye
Copy link
Contributor Author

krisiye commented Sep 23, 2020

@ryanjbaxter - i see this is targeted for 1.1.9.RELEASE. Any idea when the milestone release will be available? Looking for a ETA. Thanks!

@ryanjbaxter
Copy link
Contributor

Keep an eye on the milestones here https://github.com/spring-cloud/spring-cloud-release/milestones

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants