mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-29 10:55:05 +00:00
fix cli output adjustments (#5787)
Signed-off-by: cleverhu <shouping.hu@daocloud.io> Signed-off-by: cleverhu <shouping.hu@daocloud.io>
This commit is contained in:
parent
c3ab0687bb
commit
0edff469ba
5 changed files with 8 additions and 14 deletions
|
@ -155,7 +155,7 @@ func Command() *cobra.Command {
|
|||
applyCommandConfig := &ApplyCommandConfig{}
|
||||
cmd = &cobra.Command{
|
||||
Use: "apply",
|
||||
Short: "applies policies on resources",
|
||||
Short: "Applies policies on resources.",
|
||||
Example: applyHelp,
|
||||
RunE: func(cmd *cobra.Command, policyPaths []string) (err error) {
|
||||
defer func() {
|
||||
|
|
|
@ -1,23 +1,17 @@
|
|||
package jp
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/kyverno/kyverno/cmd/cli/kubectl-kyverno/jp/function"
|
||||
"github.com/kyverno/kyverno/cmd/cli/kubectl-kyverno/jp/parse"
|
||||
"github.com/kyverno/kyverno/cmd/cli/kubectl-kyverno/jp/query"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var description = []string{
|
||||
"Provides a command-line interface to JMESPath, enhanced with Kyverno specific custom functions",
|
||||
"For more information visit: https://kyverno.io/docs/writing-policies/jmespath/ ",
|
||||
}
|
||||
|
||||
func Command() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "jp",
|
||||
Short: strings.Join(description, "\n"),
|
||||
Use: "jp",
|
||||
Short: `Provides a command-line interface to JMESPath, enhanced with Kyverno specific custom functions.
|
||||
For more information visit: https://kyverno.io/docs/writing-policies/jmespath/.`,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return cmd.Help()
|
||||
},
|
||||
|
|
|
@ -49,8 +49,8 @@ func annotations(policy kyvernov1.PolicyInterface) map[string]string {
|
|||
func Command() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "oci",
|
||||
Long: `This command is one of the supported experimental commands, and its behaviour might be changed any time`,
|
||||
Short: "pulls/pushes images that include policie(s) from/to OCI registries",
|
||||
Long: `This command is one of the supported experimental commands, and its behaviour might be changed any time.`,
|
||||
Short: "Pulls/pushes images that include policie(s) from/to OCI registries.",
|
||||
Example: "",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return cmd.Help()
|
||||
|
|
|
@ -169,7 +169,7 @@ func Command() *cobra.Command {
|
|||
cmd = &cobra.Command{
|
||||
Use: "test <path_to_folder_Containing_test.yamls> [flags]\n kyverno test <path_to_gitRepository_with_dir> --git-branch <branchName>\n kyverno test --manifest-mutate > kyverno-test.yaml\n kyverno test --manifest-validate > kyverno-test.yaml",
|
||||
// Args: cobra.ExactArgs(1),
|
||||
Short: "run tests from directory",
|
||||
Short: "Run tests from directory.",
|
||||
Long: longHelp,
|
||||
Example: exampleHelp,
|
||||
RunE: func(cmd *cobra.Command, dirPath []string) (err error) {
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
func Command() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Shows current version of kyverno",
|
||||
Short: "Shows current version of kyverno.",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
fmt.Printf("Version: %s\n", version.BuildVersion)
|
||||
fmt.Printf("Time: %s\n", version.BuildTime)
|
||||
|
|
Loading…
Add table
Reference in a new issue