apigee/microgateway-config

Could we spruce up the documentation a bit to clearly explain merge behavior between multiple config.yaml files?

Closed this issue · 3 comments

Hey there, running into some some confusion that hopefully someone is able and willing to clear up for me:

I'm having trouble understanding source and target terminology.

Specifically I'm having trouble understanding how the source files and target files map to the following:

  • the default.yaml config file generated via edgemicro init
  • the {org}-{env}-config.yaml file generated on edgemicro configure
  • an {org}-{env}-config.yaml file that I generated elsewhere and am retrieving with microgateway-config.get(..)
    Also, there is no documentation that specifies which config file's property's take precedence during a merge.

My use case: During the startup of one of my edgemicro gateways, merge the default.yaml config file and the file created by edgemicro configure. Then fetch a config file that already existed and merge those properties in last.

Any help would be much appreciated!

@ChrisDillinger - can you please tell me why you're trying to read those files directly? There should be no reason to read default.yaml.

I think this is why I'm asking if we can spruce up the documentation, it is not clear what 'target' and 'source' means in the four helper functions. There are essentially three different ways that a YAML configuration file can exist during the startup of an edgemicro server:
default.yaml, created by init
{org}-{env}-config.yaml generated on edgemicro configure
and
{my-source-controlled}-config.yaml which I want edgemicro to actually use.

Any thoughts? I just want to be able to source control a config.yaml file and pull that in while my edgemicro is standing up, but I'm struggling with understanding the inputs/outputs of these functions and how it relates to the task of merging the config files.