From bd243254d06442586844c083ecd99dd88e8ede32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?= Date: Thu, 24 Oct 2024 17:25:43 +0200 Subject: [PATCH] serve args MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Charles-Edouard Brétéché --- pkg/commands/serve/command.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/commands/serve/command.go b/pkg/commands/serve/command.go index 2931169..173be36 100644 --- a/pkg/commands/serve/command.go +++ b/pkg/commands/serve/command.go @@ -11,7 +11,7 @@ func Command() *cobra.Command { var policies []string var address string var healthaddress string - serve := &cobra.Command{ + command := &cobra.Command{ Use: "serve", Short: "Start the kyverno-envoy-plugin server", Run: func(cmd *cobra.Command, args []string) { @@ -20,5 +20,8 @@ func Command() *cobra.Command { server.StartServers(ctx, srv) }, } - return serve + command.Flags().StringSliceVar(&policies, "policy", nil, "Path to kyverno-json policies") + command.Flags().StringVar(&address, "address", ":9000", "Address to listen on") + command.Flags().StringVar(&healthaddress, "healthaddress", ":8181", "Address to listen on for health checks") + return command }