Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespaces : add element and environment namespaces #11

Open
Shrobs opened this issue Mar 9, 2017 · 0 comments
Open

Namespaces : add element and environment namespaces #11

Shrobs opened this issue Mar 9, 2017 · 0 comments

Comments

@Shrobs
Copy link
Owner

Shrobs commented Mar 9, 2017

Currently, the CLI got only one and only one namespace, which is the global namespace.
It contains all the key/values that are used to populate an environment and regroups : the outputs of all the stacks that are in infrastructureTemplates, the StackParameters of every stack in infrastructureTemplates, the outputs of the externalStacks and also what is in globalParameters. Climulon takes care of raising an exception if two same keys are found, when adding a new key to the global namespace.

This implementation is rigid, and forces the use of an MCF for every environment you can have.
So if you have 3 environment (prod, stage, dev) and 10 countries, you will have 3*10 MCF files.

By having the possibility of having multiple namespaces in the MCF, and the possibility to select one when using it, all of the MCFs can be merged in a single one.

The proposed change is to have 3 namespaces :

  • The element namespace : will contain the keys/values for each element (stack, service and taskDef)
  • The environment namespace : will contain the keys/values for each environment (prod, stage, dev). environment namespace will contain multiple levels of namespaces, linked together with a parents key
  • The global namespace : will contain the default keys/values to fall back on, or those that are not element or environment specific

The priority of namespaces when resolving values will be the following :

  • Element namespace
  • Environment namespace (if namespace contains a parents key, resolve from its parents after resolving from it)
  • Global namespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant