Skip to content

Commit

Permalink
iam verify in init supports aws
Browse files Browse the repository at this point in the history
Signed-off-by: shaoyue.chen <shaoyue.chen@zilliz.com>
  • Loading branch information
haorenfsa committed May 24, 2024
1 parent 52336c5 commit 9fd2ad4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/util/yamlparser/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ var UserYamlPath = "/milvus/configs/operator/user.yaml"

type UserYaml struct {
Minio struct {
Address string `yaml:"address"`
Port int `yaml:"port"`
UseSSL bool `yaml:"useSSL"`
UseIAM bool `yaml:"useIAM"`
CloudProvider string `yaml:"cloudProvider"`
AccessKeyID string `yaml:"accessKeyID"`
Expand Down
6 changes: 6 additions & 0 deletions tool/iam-verify/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"context"
"fmt"
"log"
"os"
"time"
Expand Down Expand Up @@ -37,6 +38,11 @@ func main() {
ContainerName: userYaml.Minio.BucketName,
})
}
case "aws":
verifyFunc = func(ctx context.Context) error {
address := fmt.Sprintf("%s:%d", userYaml.Minio.Address, userYaml.Minio.Port)
return iam.VerifyAWS(ctx, userYaml.Minio.BucketName, address, userYaml.Minio.UseSSL)

Check failure on line 44 in tool/iam-verify/main.go

View workflow job for this annotation

GitHub Actions / Unit Test (ubuntu18.04)

undefined: iam.VerifyAWS
}
default:
log.Printf("iam-verify for csp %s not implement, assume success\n", userYaml.Minio.CloudProvider)
os.Exit(0)
Expand Down

0 comments on commit 9fd2ad4

Please sign in to comment.