From a0ac22197038b56b2432905dbd9bd64cce217633 Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Tue, 29 Nov 2022 16:47:23 -0500 Subject: [PATCH] basic reserved services (#41) --- cmd/zrok/share_private.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/zrok/share_private.go b/cmd/zrok/share_private.go index a3b7c5dd..1a6caf9d 100644 --- a/cmd/zrok/share_private.go +++ b/cmd/zrok/share_private.go @@ -27,6 +27,7 @@ func init() { type sharePrivateCommand struct { basicAuth []string + reserve bool cmd *cobra.Command } @@ -38,6 +39,7 @@ func newSharePrivateCommand() *sharePrivateCommand { } command := &sharePrivateCommand{cmd: cmd} cmd.Flags().StringArrayVar(&command.basicAuth, "basic-auth", []string{}, "Basic authentication users (,...") + cmd.Flags().BoolVar(&command.reserve, "reserve", false, "Reserve the service (don't free after exit)") cmd.Run = command.run return command } @@ -89,6 +91,7 @@ func (cmd *sharePrivateCommand) run(_ *cobra.Command, args []string) { BackendMode: "proxy", BackendProxyEndpoint: cfg.EndpointAddress, AuthScheme: string(model.None), + Reserve: cmd.reserve, } if len(cmd.basicAuth) > 0 { logrus.Infof("configuring basic auth")