alibaba/spring-cloud-alibaba

Kubernetes native configuration managenment

Open

#3114 opened on Jan 28, 2023

View on GitHub
 (7 comments) (0 reactions) (1 assignee)Java (29,106 stars) (8,513 forks)batch import
good first issuekind/discussion

Description

Background

Kubernetes has become synonymous with cloud-native, and building applications based on Kubernetes can help us reduce maintenance costs and software complexity, so imagine if Kubernetes could be integrated into the Spring ecosystem, which I'm sure could solve any problem you're facing.

Kubernetes provides Configmap and Secret to manage configuration, Spring Cloud provides the ability to dynamically refresh at runtime, and the combination of the two makes for a "cloud-native configuration center" with native-supported RBAC, so you don't need Nacos (config) / Apollo anymore.

Goals

  • Ability to pull the specified configuration and resolve it to the Spring environment when the application starts up.
  • Provides the ability to dynamically refresh and get the latest values when configmap/secret is changed.
  • Configure priority, prioritize local configuration or remote configuration
  • Completely driven by configuration, providing configuration items similar to the following
spring:
  cloud:
    k8s:
      configmaps:
        - name: demo-configmap-01
          namespace: default
          refreshable: true
        - name: demo-configmap-02
          namespace: default
          refreshable: false
          priority: local
      secrets:
        - name: demo-secret
          namespace: default
          refreshable: true 

Contributor guide