Skip to content

Commit 358325b

Browse files
pPrecelgrego952
authored andcommitted
Improve module delete example (kyma-project#2764)
1 parent f1aa4e7 commit 358325b

File tree

5 files changed

+3
-7
lines changed

5 files changed

+3
-7
lines changed

docs/user/gen-docs/kyma_module_delete.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ kyma module delete <module> [flags]
1818

1919
## Delete a community module and auto-approve the deletion
2020
# passed argument must be in the format <namespace>/<module-template-name>
21-
# the module must be pulled from the catalog first using the 'kyma module pull' command
21+
# the format of the passed argument can be read from the 'kyma module catalog' command from the 'origin' column
2222
kyma module delete my-namespace/my-community-module-1.0.0 --auto-approve
2323
```
2424

internal/cmd/module/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func newDeleteCMD(kymaConfig *cmdcommon.KymaConfig) *cobra.Command {
3838
3939
## Delete a community module and auto-approve the deletion
4040
# passed argument must be in the format <namespace>/<module-template-name>
41-
# the module must be pulled from the catalog first using the 'kyma module pull' command
41+
# the format of the passed argument can be read from the 'kyma module catalog' command from the 'origin' column
4242
kyma module delete my-namespace/my-community-module-1.0.0 --auto-approve`,
4343

4444
Aliases: []string{"del"},

internal/cmd/module/pull.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,6 @@ func getWarningTextForCommunityModuleUsage(moduleTemplate *kyma.ModuleTemplate)
104104
"Next Steps:\n" +
105105
"To install this module on your cluster, you can use the sample command:\n" +
106106
" # Install with default configuration:\n" +
107-
fmt.Sprintf(" kyma module add %s --origin %s/%s --default-cr\n\n", moduleTemplate.Spec.ModuleName, moduleTemplate.Namespace, moduleTemplate.Name) +
107+
fmt.Sprintf(" kyma module add %s/%s --default-cr\n\n", moduleTemplate.Namespace, moduleTemplate.Name) +
108108
"For more information about module installation, run: kyma module add --help\n"
109109
}

internal/modules/enable.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ func enable(printer *out.Printer, ctx context.Context, client kube.Client, repo
2626
"make sure you provide a valid module name and channel (or version)",
2727
"to list available modules, call the `kyma module catalog` command",
2828
"to pull available modules, call the `kyma module pull` command",
29-
"to add a community module, use the `--origin` flag",
3029
}
3130
return clierror.Wrap(err, clierror.New("unknown module name or channel", hints...))
3231
}

internal/modules/enable_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ func TestEnable(t *testing.T) {
164164
"make sure you provide a valid module name and channel (or version)",
165165
"to list available modules, call the `kyma module catalog` command",
166166
"to pull available modules, call the `kyma module pull` command",
167-
"to add a community module, use the `--origin` flag",
168167
}
169168

170169
expectedCliErr := clierror.Wrap(
@@ -194,7 +193,6 @@ func TestEnable(t *testing.T) {
194193
"make sure you provide a valid module name and channel (or version)",
195194
"to list available modules, call the `kyma module catalog` command",
196195
"to pull available modules, call the `kyma module pull` command",
197-
"to add a community module, use the `--origin` flag",
198196
}
199197

200198
expectedCliErr := clierror.Wrap(
@@ -227,7 +225,6 @@ func TestEnable(t *testing.T) {
227225
"make sure you provide valid module name and channel (or version)",
228226
"list available modules by calling the `kyma module catalog` command",
229227
"pull available modules by calling the `kyma module pull` command",
230-
"if you want to add a community module, use the `--origin` flag",
231228
}
232229

233230
expectedCliErr := clierror.Wrap(

0 commit comments

Comments
 (0)