From 6be807905a25c10548d1d614ccb04a12048d6b04 Mon Sep 17 00:00:00 2001 From: Steven Martin Date: Thu, 25 Jul 2024 09:39:00 -0400 Subject: [PATCH 1/8] update teleport configure -o description --- tool/teleport/common/teleport.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/teleport/common/teleport.go b/tool/teleport/common/teleport.go index ae39e3d9c86ba..00d3307037c43 100644 --- a/tool/teleport/common/teleport.go +++ b/tool/teleport/common/teleport.go @@ -300,7 +300,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con dbConfigureCreate.Flag("gcp-instance-id", "(Only for Cloud SQL) GCP Cloud SQL instance identifier.").StringVar(&dbConfigCreateFlags.DatabaseGCPInstanceID) dbConfigureCreate.Flag("ca-cert-file", "Database CA certificate path.").StringVar(&dbConfigCreateFlags.DatabaseCACertFile) dbConfigureCreate.Flag("output", - "Write to stdout with -o=stdout, default config file with -o=file or custom path with -o=file:///path").Short('o').Default( + "Write to stdout with -o=stdout, default config file with \"-o file\" or custom path with -o=file:///path").Short('o').Default( teleport.SchemeStdout).StringVar(&dbConfigCreateFlags.output) dbConfigureCreate.Flag("dynamic-resources-labels", "Comma-separated list(s) of labels to match dynamic resources, for example env=dev,dept=it. Required to enable dynamic resources matching.").StringsVar(&dbConfigCreateFlags.DynamicResourcesRawLabels) dbConfigureCreate.Alias(dbCreateConfigExamples) // We're using "alias" section to display usage examples. @@ -386,7 +386,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con dump.Flag("cluster-name", "Unique cluster name, e.g. example.com.").StringVar(&dumpFlags.ClusterName) dump.Flag("output", - "Write to stdout with -o=stdout, default config file with -o=file or custom path with -o=file:///path").Short('o').Default( + "Write to stdout with -o=stdout, default config file with \"-o file\" or custom path with -o=file:///path").Short('o').Default( teleport.SchemeStdout).StringVar(&dumpFlags.output) dump.Flag("acme", "Get automatic certificate from Letsencrypt.org using ACME.").BoolVar(&dumpFlags.ACMEEnabled) From 860b0944945042d7a8e6a5831e23ec783a890f52 Mon Sep 17 00:00:00 2001 From: Steven Martin Date: Thu, 25 Jul 2024 09:46:17 -0400 Subject: [PATCH 2/8] for abs path show the --output instead of -o --- tool/teleport/common/teleport.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/teleport/common/teleport.go b/tool/teleport/common/teleport.go index 00d3307037c43..e117b4b663bbf 100644 --- a/tool/teleport/common/teleport.go +++ b/tool/teleport/common/teleport.go @@ -300,7 +300,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con dbConfigureCreate.Flag("gcp-instance-id", "(Only for Cloud SQL) GCP Cloud SQL instance identifier.").StringVar(&dbConfigCreateFlags.DatabaseGCPInstanceID) dbConfigureCreate.Flag("ca-cert-file", "Database CA certificate path.").StringVar(&dbConfigCreateFlags.DatabaseCACertFile) dbConfigureCreate.Flag("output", - "Write to stdout with -o=stdout, default config file with \"-o file\" or custom path with -o=file:///path").Short('o').Default( + "Write to stdout with -o=stdout, default config file with \"-o file\" or custom path with --output=file:///path").Short('o').Default( teleport.SchemeStdout).StringVar(&dbConfigCreateFlags.output) dbConfigureCreate.Flag("dynamic-resources-labels", "Comma-separated list(s) of labels to match dynamic resources, for example env=dev,dept=it. Required to enable dynamic resources matching.").StringsVar(&dbConfigCreateFlags.DynamicResourcesRawLabels) dbConfigureCreate.Alias(dbCreateConfigExamples) // We're using "alias" section to display usage examples. @@ -386,7 +386,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con dump.Flag("cluster-name", "Unique cluster name, e.g. example.com.").StringVar(&dumpFlags.ClusterName) dump.Flag("output", - "Write to stdout with -o=stdout, default config file with \"-o file\" or custom path with -o=file:///path").Short('o').Default( + "Write to stdout with -o=stdout, default config file with \"-o file\" or custom path with --output=file:///path").Short('o').Default( teleport.SchemeStdout).StringVar(&dumpFlags.output) dump.Flag("acme", "Get automatic certificate from Letsencrypt.org using ACME.").BoolVar(&dumpFlags.ACMEEnabled) From 81d189eba0c573fa82403517e1fde6ba360873a8 Mon Sep 17 00:00:00 2001 From: Steven Martin Date: Thu, 25 Jul 2024 09:48:32 -0400 Subject: [PATCH 3/8] use --output instead of -o for abs path for service location --- tool/teleport/common/teleport.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/teleport/common/teleport.go b/tool/teleport/common/teleport.go index e117b4b663bbf..497743669c87b 100644 --- a/tool/teleport/common/teleport.go +++ b/tool/teleport/common/teleport.go @@ -367,7 +367,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con systemdInstall.Flag("pid-file", "Full path to the PID file.").Default(config.SystemdDefaultPIDFile).StringVar(&systemdInstallFlags.PIDFile) systemdInstall.Flag("fd-limit", "Maximum number of open file descriptors.").Default(fmt.Sprintf("%v", config.SystemdDefaultFileDescriptorLimit)).IntVar(&systemdInstallFlags.FileDescriptorLimit) systemdInstall.Flag("teleport-path", "Full path to the Teleport binary.").StringVar(&systemdInstallFlags.TeleportInstallationFile) - systemdInstall.Flag("output", "Write to stdout with -o=stdout or custom path with -o=file:///path").Short('o').Default(teleport.SchemeStdout).StringVar(&systemdInstallFlags.output) + systemdInstall.Flag("output", "Write to stdout with -o=stdout or custom path with --output=file:///path").Short('o').Default(teleport.SchemeStdout).StringVar(&systemdInstallFlags.output) systemdInstall.Alias(systemdInstallExamples) // We're using "alias" section to display usage examples. // define a hidden 'scp' command (it implements server-side implementation of handling From 19edc5527f3d8658c874be6def7e92145bf65c20 Mon Sep 17 00:00:00 2001 From: Steven Martin Date: Thu, 25 Jul 2024 09:51:55 -0400 Subject: [PATCH 4/8] update -o description for configure Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com> --- tool/teleport/common/teleport.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/teleport/common/teleport.go b/tool/teleport/common/teleport.go index 497743669c87b..b6549e5533c42 100644 --- a/tool/teleport/common/teleport.go +++ b/tool/teleport/common/teleport.go @@ -300,7 +300,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con dbConfigureCreate.Flag("gcp-instance-id", "(Only for Cloud SQL) GCP Cloud SQL instance identifier.").StringVar(&dbConfigCreateFlags.DatabaseGCPInstanceID) dbConfigureCreate.Flag("ca-cert-file", "Database CA certificate path.").StringVar(&dbConfigCreateFlags.DatabaseCACertFile) dbConfigureCreate.Flag("output", - "Write to stdout with -o=stdout, default config file with \"-o file\" or custom path with --output=file:///path").Short('o').Default( + `Write to stdout with "-o stdout", default config file with "-o file" or custom path with --output=file:///path`).Short('o').Default( teleport.SchemeStdout).StringVar(&dbConfigCreateFlags.output) dbConfigureCreate.Flag("dynamic-resources-labels", "Comma-separated list(s) of labels to match dynamic resources, for example env=dev,dept=it. Required to enable dynamic resources matching.").StringsVar(&dbConfigCreateFlags.DynamicResourcesRawLabels) dbConfigureCreate.Alias(dbCreateConfigExamples) // We're using "alias" section to display usage examples. @@ -386,7 +386,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con dump.Flag("cluster-name", "Unique cluster name, e.g. example.com.").StringVar(&dumpFlags.ClusterName) dump.Flag("output", - "Write to stdout with -o=stdout, default config file with \"-o file\" or custom path with --output=file:///path").Short('o').Default( + `Write to stdout with "-o stdout", default config file with "-o file" or custom path with --output=file:///path`).Short('o').Default( teleport.SchemeStdout).StringVar(&dumpFlags.output) dump.Flag("acme", "Get automatic certificate from Letsencrypt.org using ACME.").BoolVar(&dumpFlags.ACMEEnabled) From 46e9eaba6ea2266a4d08d0dc135b074de9194ad6 Mon Sep 17 00:00:00 2001 From: Steven Martin Date: Thu, 25 Jul 2024 10:03:28 -0400 Subject: [PATCH 5/8] update -o=stdout to -o stdout for install systemd --- tool/teleport/common/teleport.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/teleport/common/teleport.go b/tool/teleport/common/teleport.go index b6549e5533c42..5280c1e47c0ec 100644 --- a/tool/teleport/common/teleport.go +++ b/tool/teleport/common/teleport.go @@ -367,7 +367,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con systemdInstall.Flag("pid-file", "Full path to the PID file.").Default(config.SystemdDefaultPIDFile).StringVar(&systemdInstallFlags.PIDFile) systemdInstall.Flag("fd-limit", "Maximum number of open file descriptors.").Default(fmt.Sprintf("%v", config.SystemdDefaultFileDescriptorLimit)).IntVar(&systemdInstallFlags.FileDescriptorLimit) systemdInstall.Flag("teleport-path", "Full path to the Teleport binary.").StringVar(&systemdInstallFlags.TeleportInstallationFile) - systemdInstall.Flag("output", "Write to stdout with -o=stdout or custom path with --output=file:///path").Short('o').Default(teleport.SchemeStdout).StringVar(&systemdInstallFlags.output) + systemdInstall.Flag("output", `Write to stdout with "-o stdout" or custom path with --output=file:///path`).Short('o').Default(teleport.SchemeStdout).StringVar(&systemdInstallFlags.output) systemdInstall.Alias(systemdInstallExamples) // We're using "alias" section to display usage examples. // define a hidden 'scp' command (it implements server-side implementation of handling From 3c5e68a528e853938ae59834e05a499c1bff0ba7 Mon Sep 17 00:00:00 2001 From: Steven Martin Date: Thu, 25 Jul 2024 10:05:42 -0400 Subject: [PATCH 6/8] update command to use -o required parameters --- tool/teleport/common/teleport.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/teleport/common/teleport.go b/tool/teleport/common/teleport.go index 5280c1e47c0ec..40d24211f27d4 100644 --- a/tool/teleport/common/teleport.go +++ b/tool/teleport/common/teleport.go @@ -414,7 +414,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con dumpNodeConfigure.Flag("cluster-name", "Unique cluster name, e.g. example.com.").StringVar(&dumpFlags.ClusterName) dumpNodeConfigure.Flag("output", - "Write to stdout with -o=stdout, default config file with -o=file or custom path with -o=file:///path").Short('o').Default( + `Write to stdout with "-o stdout", default config file with "-o file" or custom path with --output=file:///path`).Short('o').Default( teleport.SchemeStdout).StringVar(&dumpFlags.output) dumpNodeConfigure.Flag("version", "Teleport configuration version.").Default(defaults.TeleportConfigVersionV3).StringVar(&dumpFlags.Version) dumpNodeConfigure.Flag("public-addr", "The hostport that the node advertises for the SSH endpoint.").StringVar(&dumpFlags.PublicAddr) From 637987c0b51226099e692eb1b934620d84b833e4 Mon Sep 17 00:00:00 2001 From: Steven Martin Date: Thu, 25 Jul 2024 12:13:14 -0400 Subject: [PATCH 7/8] updated -o to --output for output description consistency --- tool/teleport/common/teleport.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tool/teleport/common/teleport.go b/tool/teleport/common/teleport.go index 40d24211f27d4..adfe35f0f6a7a 100644 --- a/tool/teleport/common/teleport.go +++ b/tool/teleport/common/teleport.go @@ -300,7 +300,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con dbConfigureCreate.Flag("gcp-instance-id", "(Only for Cloud SQL) GCP Cloud SQL instance identifier.").StringVar(&dbConfigCreateFlags.DatabaseGCPInstanceID) dbConfigureCreate.Flag("ca-cert-file", "Database CA certificate path.").StringVar(&dbConfigCreateFlags.DatabaseCACertFile) dbConfigureCreate.Flag("output", - `Write to stdout with "-o stdout", default config file with "-o file" or custom path with --output=file:///path`).Short('o').Default( + `Write to stdout with "--output stdout", default config file with "--output file" or custom path with --output=file:///path`).Short('o').Default( teleport.SchemeStdout).StringVar(&dbConfigCreateFlags.output) dbConfigureCreate.Flag("dynamic-resources-labels", "Comma-separated list(s) of labels to match dynamic resources, for example env=dev,dept=it. Required to enable dynamic resources matching.").StringsVar(&dbConfigCreateFlags.DynamicResourcesRawLabels) dbConfigureCreate.Alias(dbCreateConfigExamples) // We're using "alias" section to display usage examples. @@ -367,7 +367,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con systemdInstall.Flag("pid-file", "Full path to the PID file.").Default(config.SystemdDefaultPIDFile).StringVar(&systemdInstallFlags.PIDFile) systemdInstall.Flag("fd-limit", "Maximum number of open file descriptors.").Default(fmt.Sprintf("%v", config.SystemdDefaultFileDescriptorLimit)).IntVar(&systemdInstallFlags.FileDescriptorLimit) systemdInstall.Flag("teleport-path", "Full path to the Teleport binary.").StringVar(&systemdInstallFlags.TeleportInstallationFile) - systemdInstall.Flag("output", `Write to stdout with "-o stdout" or custom path with --output=file:///path`).Short('o').Default(teleport.SchemeStdout).StringVar(&systemdInstallFlags.output) + systemdInstall.Flag("output", `Write to stdout with "--output stdout" or custom path with --output=file:///path`).Short('o').Default(teleport.SchemeStdout).StringVar(&systemdInstallFlags.output) systemdInstall.Alias(systemdInstallExamples) // We're using "alias" section to display usage examples. // define a hidden 'scp' command (it implements server-side implementation of handling @@ -386,7 +386,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con dump.Flag("cluster-name", "Unique cluster name, e.g. example.com.").StringVar(&dumpFlags.ClusterName) dump.Flag("output", - `Write to stdout with "-o stdout", default config file with "-o file" or custom path with --output=file:///path`).Short('o').Default( + `Write to stdout with "--output stdout", default config file with "--output file" or custom path with --output=file:///path`).Short('o').Default( teleport.SchemeStdout).StringVar(&dumpFlags.output) dump.Flag("acme", "Get automatic certificate from Letsencrypt.org using ACME.").BoolVar(&dumpFlags.ACMEEnabled) @@ -414,7 +414,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con dumpNodeConfigure.Flag("cluster-name", "Unique cluster name, e.g. example.com.").StringVar(&dumpFlags.ClusterName) dumpNodeConfigure.Flag("output", - `Write to stdout with "-o stdout", default config file with "-o file" or custom path with --output=file:///path`).Short('o').Default( + `Write to stdout with "--output stdout", default config file with "--output file" or custom path with --output=file:///path`).Short('o').Default( teleport.SchemeStdout).StringVar(&dumpFlags.output) dumpNodeConfigure.Flag("version", "Teleport configuration version.").Default(defaults.TeleportConfigVersionV3).StringVar(&dumpFlags.Version) dumpNodeConfigure.Flag("public-addr", "The hostport that the node advertises for the SSH endpoint.").StringVar(&dumpFlags.PublicAddr) From 9cc4d00e350b7ac27d35b00fc11959342d5e1090 Mon Sep 17 00:00:00 2001 From: Steven Martin Date: Thu, 25 Jul 2024 16:21:05 -0400 Subject: [PATCH 8/8] update to consistently use --output= in command descriptions --- tool/teleport/common/teleport.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tool/teleport/common/teleport.go b/tool/teleport/common/teleport.go index adfe35f0f6a7a..08a3fb74fcf51 100644 --- a/tool/teleport/common/teleport.go +++ b/tool/teleport/common/teleport.go @@ -300,7 +300,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con dbConfigureCreate.Flag("gcp-instance-id", "(Only for Cloud SQL) GCP Cloud SQL instance identifier.").StringVar(&dbConfigCreateFlags.DatabaseGCPInstanceID) dbConfigureCreate.Flag("ca-cert-file", "Database CA certificate path.").StringVar(&dbConfigCreateFlags.DatabaseCACertFile) dbConfigureCreate.Flag("output", - `Write to stdout with "--output stdout", default config file with "--output file" or custom path with --output=file:///path`).Short('o').Default( + `Write to stdout with "--output=stdout", default config file with "--output=file" or custom path with --output=file:///path`).Short('o').Default( teleport.SchemeStdout).StringVar(&dbConfigCreateFlags.output) dbConfigureCreate.Flag("dynamic-resources-labels", "Comma-separated list(s) of labels to match dynamic resources, for example env=dev,dept=it. Required to enable dynamic resources matching.").StringsVar(&dbConfigCreateFlags.DynamicResourcesRawLabels) dbConfigureCreate.Alias(dbCreateConfigExamples) // We're using "alias" section to display usage examples. @@ -367,7 +367,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con systemdInstall.Flag("pid-file", "Full path to the PID file.").Default(config.SystemdDefaultPIDFile).StringVar(&systemdInstallFlags.PIDFile) systemdInstall.Flag("fd-limit", "Maximum number of open file descriptors.").Default(fmt.Sprintf("%v", config.SystemdDefaultFileDescriptorLimit)).IntVar(&systemdInstallFlags.FileDescriptorLimit) systemdInstall.Flag("teleport-path", "Full path to the Teleport binary.").StringVar(&systemdInstallFlags.TeleportInstallationFile) - systemdInstall.Flag("output", `Write to stdout with "--output stdout" or custom path with --output=file:///path`).Short('o').Default(teleport.SchemeStdout).StringVar(&systemdInstallFlags.output) + systemdInstall.Flag("output", `Write to stdout with "--output=stdout" or custom path with --output=file:///path`).Short('o').Default(teleport.SchemeStdout).StringVar(&systemdInstallFlags.output) systemdInstall.Alias(systemdInstallExamples) // We're using "alias" section to display usage examples. // define a hidden 'scp' command (it implements server-side implementation of handling @@ -386,7 +386,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con dump.Flag("cluster-name", "Unique cluster name, e.g. example.com.").StringVar(&dumpFlags.ClusterName) dump.Flag("output", - `Write to stdout with "--output stdout", default config file with "--output file" or custom path with --output=file:///path`).Short('o').Default( + `Write to stdout with "--output=stdout", default config file with "--output=file" or custom path with --output=file:///path`).Short('o').Default( teleport.SchemeStdout).StringVar(&dumpFlags.output) dump.Flag("acme", "Get automatic certificate from Letsencrypt.org using ACME.").BoolVar(&dumpFlags.ACMEEnabled) @@ -414,7 +414,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con dumpNodeConfigure.Flag("cluster-name", "Unique cluster name, e.g. example.com.").StringVar(&dumpFlags.ClusterName) dumpNodeConfigure.Flag("output", - `Write to stdout with "--output stdout", default config file with "--output file" or custom path with --output=file:///path`).Short('o').Default( + `Write to stdout with "--output=stdout", default config file with "--output=file" or custom path with --output=file:///path`).Short('o').Default( teleport.SchemeStdout).StringVar(&dumpFlags.output) dumpNodeConfigure.Flag("version", "Teleport configuration version.").Default(defaults.TeleportConfigVersionV3).StringVar(&dumpFlags.Version) dumpNodeConfigure.Flag("public-addr", "The hostport that the node advertises for the SSH endpoint.").StringVar(&dumpFlags.PublicAddr)