From 21ab5a602ec8d8dbbb4324d156bebe7f7e5e7025 Mon Sep 17 00:00:00 2001 From: David Wertenteil Date: Sun, 13 Nov 2022 15:01:32 +0200 Subject: [PATCH] Deprecate rbac submit --- cmd/submit/rbac.go | 9 +++++---- cmd/submit/submit.go | 11 ++++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/cmd/submit/rbac.go b/cmd/submit/rbac.go index d08012d3..4bb5e085 100644 --- a/cmd/submit/rbac.go +++ b/cmd/submit/rbac.go @@ -31,10 +31,11 @@ var ( // getRBACCmd represents the RBAC command func getRBACCmd(ks meta.IKubescape, submitInfo *v1.Submit) *cobra.Command { return &cobra.Command{ - Use: "rbac", - Example: rbacExamples, - Short: "Submit cluster's Role-Based Access Control(RBAC)", - Long: ``, + Use: "rbac", + Deprecated: "This command is deprecated and will not be supported after 1/Jan/2023. Please use the 'scan' command instead.", + Example: rbacExamples, + Short: "Submit cluster's Role-Based Access Control(RBAC)", + Long: ``, RunE: func(cmd *cobra.Command, args []string) error { if err := flagValidationSubmit(submitInfo); err != nil { diff --git a/cmd/submit/submit.go b/cmd/submit/submit.go index 158f9b37..c05caf52 100644 --- a/cmd/submit/submit.go +++ b/cmd/submit/submit.go @@ -7,16 +7,21 @@ import ( ) var submitCmdExamples = ` +# Submit Kubescape scan results file +kubescape submit results +# Submit exceptions file to Kubescape SaaS +kubescape submit exceptions ` func GetSubmitCmd(ks meta.IKubescape) *cobra.Command { var submitInfo metav1.Submit submitCmd := &cobra.Command{ - Use: "submit ", - Short: "Submit an object to the Kubescape SaaS version", - Long: ``, + Use: "submit ", + Short: "Submit an object to the Kubescape SaaS version", + Long: ``, + Example: submitCmdExamples, Run: func(cmd *cobra.Command, args []string) { }, }