apptio / kr8

An opinionated Kubernetes cluster configuration management tool
https://apptio.github.io/kr8/
MIT License
167 stars 17 forks source link

Add additional options #19

Closed cspargo closed 5 years ago

cspargo commented 5 years ago

Adds three new options

  1. --clusterdir <directory> specify the path to the cluster directory. This overrides the default of KR8_BASE/clusters
  2. --componentdir <directory> specify the path to the component directory. This overrides the default of KR8_BASE/components
  3. --clusterparams <filepath.jsonnet provide a jsonnet file that should contain cluster parameters. It can be combined with --cluster <clustername> to specify overrides or additional parameters to be added ahead of the parameters defined by the cluster. It can also be used separately without specifying --cluster <clustername at all.

These options are primarily meant to help with testing, but also enhance the possible ways that kr8 could be used.

In addition to this, when defining components to include in "_components", which would normally look like this:

{
  _components: {
    componentinstance1: { path: 'components/component1' },
    componentinstance2: { path: 'components/component2' },
  }

can now be specified like this instead

{
  _components: {
    componentinstance1: { component: 'component1' },
    componentinstance2: { component: 'component2' },
  }

and the components will be looked for in the component directory. The intention is to later expand clusterdir, to add multiple search locations, and probably deprecate the "path" field.

jaxxstorm commented 5 years ago

LGTM