0

Config server supports reading yml files with the name {applicationname.yml}. But I have two yml files in my application.

a.yml
b.yml

Can I read both these yml files from config server using gitlab in PCF? I am using .net core 2.2 and steeltoe. Thanks in Advance

Sumit Manna
  • 541
  • 1
  • 5
  • 16

1 Answers1

2

Steeltoe largely relies on Config Server's logic for finding the backing files by specifying the app name, environment name and additional labels. There isn't currently a way to request additional arbitrary files, so you'd be limited to files following these patterns:

/{application}/{profile}[/{label}]
/{application}-{profile}.yml
/{label}/{application}-{profile}.yml
/{application}-{profile}.properties
/{label}/{application}-{profile}.properties

It's notable that application in this pattern represents both your application name and a generic application file for shared settings across multiple applications

Tim
  • 2,587
  • 13
  • 18
  • So if I have two applications, App1 and App2. Sometimes they are deployed as App1 and App2 together overlaid, other times just App1 by itself. Ideally the config for App2 would be just what's needed for when App2 is deployed with App1 since it's never deployed by itself. Is there a way to do that in Spring Config? Essentially, merge two yml files... It seems like my only option is to duplicate all the config for App1 plus add in App2's config for the App1 and App2 together scenario. Seems unfortunately. I can't use Shared because there are additional apps. – tidmutt Nov 12 '20 at 00:02