feat: add minio support (#1048)

* feat: add minio support

Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>

* feat: add TLS skip for custom https minio endpoint

Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>

* feat: update cache with the new proto schema

Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>

---------

Signed-off-by: Aris Boutselis <arisboutselis08@gmail.com>
This commit is contained in:
Aris Boutselis
2024-04-19 11:58:41 +01:00
committed by GitHub
parent 3eaf776249
commit e6085d4191
11 changed files with 51 additions and 26 deletions

4
pkg/cache/cache.go vendored
View File

@@ -47,7 +47,7 @@ func ParseCacheConfiguration() (CacheProvider, error) {
return cacheInfo, nil
}
func NewCacheProvider(cacheType, bucketname, region, storageAccount, containerName, projectId string) (CacheProvider, error) {
func NewCacheProvider(cacheType, bucketname, region, endpoint, storageAccount, containerName, projectId string, insecure bool) (CacheProvider, error) {
cProvider := CacheProvider{}
switch {
@@ -61,6 +61,8 @@ func NewCacheProvider(cacheType, bucketname, region, storageAccount, containerNa
case cacheType == "s3":
cProvider.S3.BucketName = bucketname
cProvider.S3.Region = region
cProvider.S3.Endpoint = endpoint
cProvider.S3.InsecureSkipVerify = insecure
default:
return CacheProvider{}, status.Error(codes.Internal, fmt.Sprintf("%s is not a valid option", cacheType))
}