cli: add missing flag to miniConstellation (#1374)

* Add missing flag to miniConstellation

* Add config merger to miniConstellation

* Soft fail if config can not be merged

* Remove config flattening

* Release spinner stop lock when stopping finished

---------

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
Co-authored-by: Nils Hanke <nils.hanke@outlook.com>
This commit is contained in:
Daniel Weiße 2023-03-08 15:48:36 +01:00 committed by GitHub
parent ebf7dd8842
commit 446b77828b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 10 deletions

View file

@ -42,6 +42,7 @@ func newMiniUpCmd() *cobra.Command {
// override global flag so we don't have a default value for the config
cmd.Flags().String("config", "", "path to the configuration file to use for the cluster")
cmd.Flags().Bool("merge-kubeconfig", true, "merge Constellation kubeconfig file with default kubeconfig file in $HOME/.kube/config")
return cmd
}
@ -264,7 +265,7 @@ func (m *miniUpCmd) initializeMiniCluster(cmd *cobra.Command, fileHandler file.H
}
m.log.Debugf("Created new logger")
defer log.Sync()
i := &initCmd{log: log}
i := &initCmd{log: log, merger: &kubeconfigMerger{log: log}}
if err := i.initialize(cmd, newDialer, fileHandler, license.NewClient(), spinner); err != nil {
return err
}