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

Commit

Permalink
Merge pull request #342 from wallrj/341-command-line-summary
Browse files Browse the repository at this point in the history
Use consistent command line help summary for all Navigator CLI tools
  • Loading branch information
jetstack-bot authored Apr 26, 2018
2 parents db5d8e0 + aef5d77 commit 0bbf574
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 13 deletions.
10 changes: 8 additions & 2 deletions cmd/apiserver/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,19 @@ func NewNavigatorServerOptions(out, errOut io.Writer) *NavigatorServerOptions {
return o
}

// NewCommandStartMaster provides a CLI handler for 'start master' command
// NewCommandStartNavigatorServer provides a CLI handler for the 'navigator-apiserver' command
func NewCommandStartNavigatorServer(out, errOut io.Writer, stopCh <-chan struct{}) *cobra.Command {
o := NewNavigatorServerOptions(out, errOut)

cmd := &cobra.Command{
Use: "navigator-apiserver",
Short: "Launch a Navigator API server",
Long: "Launch a Navigator API server",
Long: `
Launch a Navigator API server.
Navigator is a Kubernetes extension for managing common stateful services on Kubernetes.
Documentation is available at https://navigator-dbaas.readthedocs.io.
`,
RunE: func(c *cobra.Command, args []string) error {
if err := o.Complete(); err != nil {
return err
Expand Down
14 changes: 7 additions & 7 deletions cmd/controller/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ func NewNavigatorControllerOptions(out, errOut io.Writer) *NavigatorControllerOp
return o
}

// NewCommandStartCertManagerController is a CLI handler for starting cert-manager
// NewCommandStartNavigatorController provides a CLI handler for the 'navigator-controller' command
func NewCommandStartNavigatorController(out, errOut io.Writer, stopCh <-chan struct{}) *cobra.Command {
o := NewNavigatorControllerOptions(out, errOut)

cmd := &cobra.Command{
Use: "cert-manager-controller",
Short: "Automated TLS controller for Kubernetes",
Use: "navigator-controller",
Short: "Launch a Navigator controller",
Long: `
cert-manager is a Kubernetes addon to automate the management and issuance of
TLS certificates from various issuing sources.
Launch a Navigator controller.
It will ensure certificates are valid and up to date periodically, and attempt
to renew certificates at an appropriate time before expiry.`,
Navigator is a Kubernetes extension for managing common stateful services on Kubernetes.
Documentation is available at https://navigator-dbaas.readthedocs.io.
`,

// TODO: Refactor this function from this package
Run: func(cmd *cobra.Command, args []string) {
Expand Down
10 changes: 8 additions & 2 deletions cmd/pilot-cassandra/pilot.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ func NewCommandStartPilot(out, errOut io.Writer, stopCh <-chan struct{}) *cobra.
o := v3.NewOptions(out, errOut)

cmd := &cobra.Command{
Short: "Launch a Cassandra Pilot",
Long: "Launch a Cassandra Pilot",
Use: "navigator-pilot-cassandra",
Short: "Launch a Navigator Cassandra Pilot",
Long: `
Launch a Navigator Cassandra Pilot.
Navigator is a Kubernetes extension for managing common stateful services on Kubernetes.
Documentation is available at https://navigator-dbaas.readthedocs.io.
`,
RunE: func(c *cobra.Command, args []string) error {
if err := o.Complete(); err != nil {
return err
Expand Down
10 changes: 8 additions & 2 deletions cmd/pilot-elasticsearch/pilot.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ func NewCommandStartPilot(out, errOut io.Writer, stopCh <-chan struct{}) *cobra.
o := v5.NewOptions(out, errOut)

cmd := &cobra.Command{
Short: "Launch an Elasticsearch Pilot",
Long: "Launch an Elasticsearch Pilot",
Use: "navigator-pilot-elasticsearch",
Short: "Launch a Navigator Elasticsearch Pilot",
Long: `
Launch a Navigator Elasticsearch Pilot.
Navigator is a Kubernetes extension for managing common stateful services on Kubernetes.
Documentation is available at https://navigator-dbaas.readthedocs.io.
`,
RunE: func(c *cobra.Command, args []string) error {
if err := o.Complete(); err != nil {
return err
Expand Down

0 comments on commit 0bbf574

Please sign in to comment.