From 3bb9a6d4147aef835e075847bd2778b0fff38646 Mon Sep 17 00:00:00 2001 From: Mauren Berti Date: Tue, 6 Feb 2024 21:11:55 -0500 Subject: [PATCH] fix: update long description as per code review request --- kustomize/commands/edit/set/setconfigmap.go | 4 +++- kustomize/commands/edit/set/setsecret.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/kustomize/commands/edit/set/setconfigmap.go b/kustomize/commands/edit/set/setconfigmap.go index b7a86ad74..d8ed892e2 100644 --- a/kustomize/commands/edit/set/setconfigmap.go +++ b/kustomize/commands/edit/set/setconfigmap.go @@ -30,7 +30,9 @@ func newCmdSetConfigMap( Short: fmt.Sprintf("Edits the value for an existing key for a ConfigMap in the %s file", konfig.DefaultKustomizationFileName()), Long: fmt.Sprintf(`Edits the value for an existing key in an existing ConfigMap in the %[1]s file. ConfigMap name, ConfigMap namespace, and key name must match an existing entry in the %[1]s file for this command to succeed. -When namespace is omitted, the default namespace is used.`, konfig.DefaultKustomizationFileName()), +When namespace is omitted, the default namespace is used. Conversely, when an entry without a specified namespace exists +in the %[1]s file, it can be updated by either omitting the namespace on the kustomize edit set configmap invocation or by +specifying --namespace=default.`, konfig.DefaultKustomizationFileName()), Example: fmt.Sprintf(` # Edits an existing ConfigMap in the %[1]s file, changing value of key1 to 2, and namespace is implicitly defined as "default" kustomize edit set configmap my-configmap --from-literal=key1=2 diff --git a/kustomize/commands/edit/set/setsecret.go b/kustomize/commands/edit/set/setsecret.go index c9cca6f36..ac9ee6f96 100644 --- a/kustomize/commands/edit/set/setsecret.go +++ b/kustomize/commands/edit/set/setsecret.go @@ -29,7 +29,9 @@ func newCmdSetSecret( Short: fmt.Sprintf("Edits the value for an existing key for a Secret in the %s file", konfig.DefaultKustomizationFileName()), Long: fmt.Sprintf(`Edits the value for an existing key in an existing Secret in the %[1]s file. Secret name, Secret namespace, and key name must match an existing entry in the %[1]s file for this command to succeed. -When namespace is omitted, the default namespace is used.`, konfig.DefaultKustomizationFileName()), +When namespace is omitted, the default namespace is used. Conversely, when an entry without a specified namespace exists +in the %[1]s file, it can be updated by either omitting the namespace on the kustomize edit set secret invocation or by +specifying --namespace=default.`, konfig.DefaultKustomizationFileName()), Example: fmt.Sprintf(` # Edits an existing Secret in the %[1]s file, changing the value of key1 to 2, and namespace is implicitly defined as "default" kustomize edit set secret my-secret --from-literal=key1=2