mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-57375: Update to latest minio image (#27475)
* test with latest minio image * Update the KMS key - Also use latest config settings. The older ones were deprecated.
This commit is contained in:
parent
70b218839f
commit
d20b55bde8
@ -59,14 +59,14 @@ services:
|
|||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
minio:
|
minio:
|
||||||
image: "minio/minio:RELEASE.2019-10-11T00-38-09Z"
|
image: "minio/minio:RELEASE.2024-06-22T05-26-45Z"
|
||||||
command: "server /data"
|
command: "server /data"
|
||||||
networks:
|
networks:
|
||||||
- mm-test
|
- mm-test
|
||||||
environment:
|
environment:
|
||||||
MINIO_ACCESS_KEY: minioaccesskey
|
MINIO_ROOT_USER: minioaccesskey
|
||||||
MINIO_SECRET_KEY: miniosecretkey
|
MINIO_ROOT_PASSWORD: miniosecretkey
|
||||||
MINIO_SSE_MASTER_KEY: "my-minio-key:6368616e676520746869732070617373776f726420746f206120736563726574"
|
MINIO_KMS_SECRET_KEY: my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=
|
||||||
inbucket:
|
inbucket:
|
||||||
image: "inbucket/inbucket:stable"
|
image: "inbucket/inbucket:stable"
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -56,6 +56,7 @@ type S3FileBackendNoBucketError struct{}
|
|||||||
const (
|
const (
|
||||||
// This is not exported by minio. See: https://github.com/minio/minio-go/issues/1339
|
// This is not exported by minio. See: https://github.com/minio/minio-go/issues/1339
|
||||||
bucketNotFound = "NoSuchBucket"
|
bucketNotFound = "NoSuchBucket"
|
||||||
|
invalidBucket = "InvalidBucketName"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -211,7 +212,7 @@ func (b *S3FileBackend) TestConnection() error {
|
|||||||
obj := <-b.client.ListObjects(ctx, b.bucket, s3.ListObjectsOptions{Prefix: b.pathPrefix})
|
obj := <-b.client.ListObjects(ctx, b.bucket, s3.ListObjectsOptions{Prefix: b.pathPrefix})
|
||||||
if obj.Err != nil {
|
if obj.Err != nil {
|
||||||
typedErr := s3.ToErrorResponse(obj.Err)
|
typedErr := s3.ToErrorResponse(obj.Err)
|
||||||
if typedErr.Code != bucketNotFound {
|
if typedErr.Code != bucketNotFound && typedErr.Code != invalidBucket {
|
||||||
return &S3FileBackendAuthError{DetailedError: "unable to list objects in the S3 bucket"}
|
return &S3FileBackendAuthError{DetailedError: "unable to list objects in the S3 bucket"}
|
||||||
}
|
}
|
||||||
exists = false
|
exists = false
|
||||||
@ -219,9 +220,12 @@ func (b *S3FileBackend) TestConnection() error {
|
|||||||
} else {
|
} else {
|
||||||
exists, err = b.client.BucketExists(ctx, b.bucket)
|
exists, err = b.client.BucketExists(ctx, b.bucket)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
typedErr := s3.ToErrorResponse(err)
|
||||||
|
if typedErr.Code != bucketNotFound && typedErr.Code != invalidBucket {
|
||||||
return &S3FileBackendAuthError{DetailedError: "unable to check if the S3 bucket exists"}
|
return &S3FileBackendAuthError{DetailedError: "unable to check if the S3 bucket exists"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if !exists {
|
if !exists {
|
||||||
return &S3FileBackendNoBucketError{}
|
return &S3FileBackendNoBucketError{}
|
||||||
|
Loading…
Reference in New Issue
Block a user