From 3133e97d0873de2b9832221eeaf9030ef60a808e Mon Sep 17 00:00:00 2001 From: zhijian Date: Sun, 7 Apr 2024 15:42:43 +0800 Subject: [PATCH] add `--refresh-iam-interval` flag to the gateway (#4593) --- cmd/gateway.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/gateway.go b/cmd/gateway.go index 77eac4abadf4..146d02105318 100644 --- a/cmd/gateway.go +++ b/cmd/gateway.go @@ -82,6 +82,10 @@ func cmdGateway() *cli.Command { Name: "domain", Usage: "domain for virtual-host-style requests", }, + &cli.StringFlag{ + Name: "refresh-iam-interval", + Usage: "interval to reload gateway IAM from configuration", + }, } return &cli.Command{ @@ -125,6 +129,10 @@ func gateway(c *cli.Context) error { os.Setenv("MINIO_DOMAIN", c.String("domain")) } + if c.IsSet("refresh-iam-interval") { + os.Setenv("MINIO_REFRESH_IAM_INTERVAL", c.String("refresh-iam-interval")) + } + metaAddr := c.Args().Get(0) listenAddr := c.Args().Get(1) conf, jfs := initForSvc(c, "s3gateway", metaAddr)