Skip to content

Commit 0852ee1

Browse files
committed
fix(operator): resolve merge conflict and fix VPC endpoint regex
Signed-off-by: puretension <rlrlfhtm5@gmail.com>
1 parent f4b77ac commit 0852ee1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

operator/internal/handlers/internal/storage/secrets.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ var (
7777
awsS3WithBucketRegex = regexp.MustCompile(`^https://([a-z0-9.-]+)\.s3\.([a-z0-9-]+)\.amazonaws\.com$`)
7878

7979
// VPC with bucket: https://bucket-name.vpce-id.s3.region.vpce.amazonaws.com
80-
awsVPCWithBucketRegex = regexp.MustCompile(`^https://([a-z0-9.-]+)\.bucket.vpce-[a-z0-9-]+\.s3\.([a-z0-9-]+)\.vpce\.amazonaws\.com$`)
80+
awsVPCWithBucketRegex = regexp.MustCompile(`^https://([a-z0-9.-]+)\.vpce-[a-z0-9-]+\.s3\.([a-z0-9-]+)\.vpce\.amazonaws\.com$`)
8181
)
8282

8383
func getSecrets(ctx context.Context, k k8s.Client, stack *lokiv1.LokiStack, fg configv1.FeatureGates) (*corev1.Secret, *corev1.Secret, error) {

operator/internal/handlers/internal/storage/secrets_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ func TestS3Extract(t *testing.T) {
657657
"access_key_secret": []byte("secret"),
658658
},
659659
},
660-
wantError: "endpoint for AWS S3 is invalid, must match either https://s3.region.amazonaws.com or https://vpce-id.s3.region.vpce.amazonaws.com: https://bucket.vpce-1234567abc.s3.us-east-1.vpce.amazonaws.com",
660+
wantError: "bucket name must not be included in AWS S3 endpoint URL",
661661
},
662662
{
663663
name: "aws s3 vpc endpoint wrong region",

0 commit comments

Comments
 (0)