Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Add CLI args for local cluster create and configure #2337

Merged

Conversation

stmcginnis
Copy link
Contributor

This adds the remaining CLI arguments to the local cluster create and
configure commands to be able to provide the most of the configuration
to use as part of the command line.

@stmcginnis stmcginnis requested a review from a team as a code owner October 24, 2021 19:15
@@ -66,8 +66,6 @@ type LocalClusterConfig struct {
// PortsToForward contains a mapping of host to container ports that should
// be exposed.
PortsToForward []PortMap `yaml:"PortsToForward"`
// TTY specifies whether the output of commands can be stylized and/or interactive.
Tty string `yaml:"Tty"`
Copy link
Contributor

@joshrosso joshrosso Oct 25, 2021

Choose a reason for hiding this comment

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

I'm pro keeping TTY in the config struct, I'd rather it not get treated in any special way and I can also see a lot of value in allowing TANZU_TTY to be set. Thoughts?

This adds the remaining CLI arguments to the local cluster create and
configure commands to be able to provide the most of the configuration
to use as part of the command line.

Signed-off-by: Sean McGinnis <[email protected]>
@joshrosso joshrosso merged commit c2e5954 into vmware-tanzu:standalone-overhaul Oct 25, 2021
}
clusterConfig, err := config.InitializeConfiguration(configArgs)
if err != nil {
log.Errorf("Failed to initialize configuration. Error %s\n", clusterConfig)
return nil
}
ttySetting, err := strconv.ParseBool(clusterConfig.Tty)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that this was not added back because --tty has a default of true, and CLI arguments take precedent over config and env variables. So basically this will always be whatever co.tty is, so the first logger initialization on line 56 above will never change.

@stmcginnis stmcginnis deleted the sa-overhaul-cli branch October 25, 2021 18:34
joshrosso pushed a commit that referenced this pull request Jan 18, 2022
This adds the remaining CLI arguments to the local cluster create and
configure commands to be able to provide the most of the configuration
to use as part of the command line.

Signed-off-by: Sean McGinnis <[email protected]>
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.

3 participants