1

I need to add two config repositories to my config server. But, it picks only one config repository. Can anyone please help me to fix this problem.

Config Server bootstrap.yml

server:
 port: 8899
spring:
 cloud:
  config:
   server:
    git:
      uri: https://github.com/pocuser9x/wednest-config-store
      search-paths:
        - 'wednest-config-store/*service'
    repos:
      uri: https://github.com/pocuser9x/secure-config-store

In https://github.com/pocuser9x/wednest-config-store I have below files

event-service.yml event-service-dev.yml event-service-stg.yml

These files are picking correctly.

In https://github.com/pocuser9x/secure-config-store I have below file event-service-prod.yml This file is not picking.

Dilee
  • 246
  • 1
  • 4
  • 15
  • it seems it is a duplicate of https://stackoverflow.com/questions/51737545/spring-cloud-config-multiple-composite-repositories – ocmwdt Oct 21 '20 at 08:13

1 Answers1

1

I think what you are looking for is the composite repo feature. It is documented here.

For you, this would be something like:

spring:
  profiles:
    active: composite
  cloud:
    config:
      server:
        composite:
        -
          type: git
          uri: https://github.com/pocuser9x/wednest-config-store
          search-paths:
            'wednest-config-store/*service'

        -
          type: git
          uri: https://github.com/pocuser9x/secure-config-store

One note is that the documentation shows profile set as above, but I found a need to use "include" instead of "active". Include is additive.

  profiles:
    include: composite
Marnee
  • 370
  • 1
  • 4
  • 15