alibaba/spring-cloud-alibaba

Kubernetes native configuration managenment

Open

Aperta il 28 gen 2023

Vedi su GitHub
 (7 commenti) (0 reazioni) (1 assegnatario)Java (29.106 star) (8513 fork)batch import
good first issuekind/discussion

Descrizione

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 

Guida contributor