From 8cf53b99fd4f8fb882cdcc45348a887b3db54378 Mon Sep 17 00:00:00 2001 From: Angelos Kolaitis Date: Wed, 3 Jul 2024 10:24:56 +0300 Subject: [PATCH] show features on `k8s enable/disable` (#524) * show features on help messages * make go.doc --- docs/src/_parts/commands/k8s_disable.md | 2 +- docs/src/_parts/commands/k8s_enable.md | 2 +- src/k8s/cmd/k8s/k8s_disable.go | 2 +- src/k8s/cmd/k8s/k8s_enable.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/_parts/commands/k8s_disable.md b/docs/src/_parts/commands/k8s_disable.md index 97ebaef34..d9a8c3634 100644 --- a/docs/src/_parts/commands/k8s_disable.md +++ b/docs/src/_parts/commands/k8s_disable.md @@ -7,7 +7,7 @@ Disable core cluster features Disable one of network, dns, gateway, ingress, local-storage, load-balancer. ``` -k8s disable ... [flags] +k8s disable [network|dns|gateway|ingress|local-storage|load-balancer] ... [flags] ``` ### Options diff --git a/docs/src/_parts/commands/k8s_enable.md b/docs/src/_parts/commands/k8s_enable.md index cdb972a29..04283fc15 100644 --- a/docs/src/_parts/commands/k8s_enable.md +++ b/docs/src/_parts/commands/k8s_enable.md @@ -7,7 +7,7 @@ Enable core cluster features Enable one of network, dns, gateway, ingress, local-storage, load-balancer. ``` -k8s enable ... [flags] +k8s enable [network|dns|gateway|ingress|local-storage|load-balancer] ... [flags] ``` ### Options diff --git a/src/k8s/cmd/k8s/k8s_disable.go b/src/k8s/cmd/k8s/k8s_disable.go index e14493198..ddd7889c0 100644 --- a/src/k8s/cmd/k8s/k8s_disable.go +++ b/src/k8s/cmd/k8s/k8s_disable.go @@ -27,7 +27,7 @@ func newDisableCmd(env cmdutil.ExecutionEnvironment) *cobra.Command { timeout time.Duration } cmd := &cobra.Command{ - Use: "disable ...", + Use: fmt.Sprintf("disable [%s] ...", strings.Join(featureList, "|")), Short: "Disable core cluster features", Long: fmt.Sprintf("Disable one of %s.", strings.Join(featureList, ", ")), Args: cmdutil.MinimumNArgs(env, 1), diff --git a/src/k8s/cmd/k8s/k8s_enable.go b/src/k8s/cmd/k8s/k8s_enable.go index 0844e93cd..8d9b56dbc 100644 --- a/src/k8s/cmd/k8s/k8s_enable.go +++ b/src/k8s/cmd/k8s/k8s_enable.go @@ -27,7 +27,7 @@ func newEnableCmd(env cmdutil.ExecutionEnvironment) *cobra.Command { timeout time.Duration } cmd := &cobra.Command{ - Use: "enable ...", + Use: fmt.Sprintf("enable [%s] ...", strings.Join(featureList, "|")), Short: "Enable core cluster features", Long: fmt.Sprintf("Enable one of %s.", strings.Join(featureList, ", ")), Args: cmdutil.MinimumNArgs(env, 1),