2022-12-21 07:06:13 +01:00
|
|
|
package jp
|
|
|
|
|
|
|
|
import (
|
|
|
|
"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"
|
|
|
|
)
|
|
|
|
|
|
|
|
func Command() *cobra.Command {
|
|
|
|
cmd := &cobra.Command{
|
2022-12-27 22:46:01 +08:00
|
|
|
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/.`,
|
2022-12-21 07:06:13 +01:00
|
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
|
|
return cmd.Help()
|
|
|
|
},
|
|
|
|
}
|
|
|
|
cmd.AddCommand(query.Command())
|
|
|
|
cmd.AddCommand(function.Command())
|
|
|
|
cmd.AddCommand(parse.Command())
|
|
|
|
return cmd
|
|
|
|
}
|