Skip to content

Random logs with Spring Boot 2.6.4 and Spring Cloud Kubernetes 2021.0.0 #978

@Abhi-Codes

Description

@Abhi-Codes

Describe the bug
Spring Boot 2.6.4
Spring Cloud 2021.0.0

I have deployed Spring Boot application on Kubernetes and provided explicit config map and secret name in bootstrap yaml, it is able to correctly pick up properties from config map and secrets . But I see random logs that its not able to read config map and secret having name spring boot app name-dev and spring boot app name-kubernetes . How do I disable these unnecessary logs .

With Spring Boot 2.5.10 and Spring Cloud 2020.0.3 , I was not facing this issue.

Bootstrap yaml

spring:
  config:
    activate:
      on-profile:
      - dev
  cloud:
    vault:
      uri: https://xxx.com/
      app-role:
        role-id: 75
        secret-id: c4
---

management:
  endpoints:
    web:
      exposure:
        include: restart,health
  endpoint:
    health:
      probes:
        enabled: true
    restart:
      enabled: true
  health:
    livenessstate:
      enabled: true
    readinessstate:
      enabled: true      
  server:
    port: 8081
spring: 
  cloud:
    kubernetes:
      config: 
        enabled: true
        name: ep-console-service-config
      reload: 
        enabled: true
        monitoring-config-maps: true
#        monitoring-secrets: true
        strategy: RESTART_CONTEXT
#      secrets:
#        enable-api: true
#        enabled: true 
#        name: ep-console-service-secret
    discovery:
      enabled: false
    vault:
      authentication: approle
      enabled: true
      kv:
        backend: ep
        enabled: true
  application:
    name: ep-console-service 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions