Skip to content
This repository has been archived by the owner on Nov 16, 2020. It is now read-only.

Add switchable contexts for config #478

Merged
merged 1 commit into from
May 25, 2018
Merged

Conversation

berndtj
Copy link
Contributor

@berndtj berndtj commented May 25, 2018

  • keep map of configurations with one current context
  • list contexts (highlight current)
  • set current
  • push the certificate chart

tenczar
tenczar previously approved these changes May 25, 2018
neosab
neosab previously approved these changes May 25, 2018
Copy link
Contributor

@neosab neosab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! This will reduce all the clutter with different config files :)

@@ -34,13 +34,13 @@ var (

manageExample = i18n.T(`
# Enable Dispatch bootstrap mode while specifying bootstrap user
dispatch manage --enable-bootstrap-mode --bootstrap-user [email protected] -f ./config.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should move the enable/disable bootstrap flags to their own subcommands in another PR.

* keep map of configurations with one current context
* list contexts (highlight current)
* set current
* push the certificate chart
@neosab neosab merged commit db88a41 into vmware-archive:master May 25, 2018
Copy link
Contributor

@markpeek markpeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like where this is headed but some enhancements would be good.

  • There should be a module to handle the initialization, unmarshalling, get/set context in common functions.
  • Allow for a --config or environment variable to override the current context.
  • A way to easily add and remove a context via CLI.
  • Have common code/error messages for attempting to add over an existing context name or deleting a non-existent context.
  • cmdConfig => cmdContexts?

@berndtj
Copy link
Contributor Author

berndtj commented May 26, 2018

I agree @markpeek, this was a bit quick and dirty and also not meant to be the "full" solution. We can iterate on it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants