Commit 3f4bf2c
committed
fix(operator): support private VPC S3 endpoints in Loki operator
This PR fixes the Loki operator's overly strict S3 endpoint validation that was rejecting private VPC S3 endpoints. The operator was only accepting the standard AWS S3 endpoint format and failing to reconcile when users configured private VPC endpoints in OpenShift environments.
The fix updates the validateS3Endpoint function to accept VPC endpoint formats while preventing bucket-specific VPC endpoints that could cause folder creation issues:
- Allows: https://vpce-*-region.s3.region.vpce.amazonaws.com (general VPC endpoint)
- Rejects: https://bucket.vpce-*-region.s3.region.vpce.amazonaws.com (bucket-specific VPC endpoint)
This maintains full backward compatibility with existing standard AWS S3 endpoints while adding support for VPC endpoints without the bucket name prefix that could lead to unwanted folder creation in S3 buckets.
Fixes #19243
Signed-off-by: puretension <[email protected]>1 parent 37eddab commit 3f4bf2c
File tree
2 files changed
+49
-2
lines changed- operator/internal/handlers/internal/storage
2 files changed
+49
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
| 509 | + | |
509 | 510 | | |
510 | | - | |
511 | | - | |
| 511 | + | |
| 512 | + | |
512 | 513 | | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
513 | 527 | | |
514 | 528 | | |
515 | 529 | | |
| |||
Lines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
722 | 755 | | |
723 | 756 | | |
724 | 757 | | |
| |||
0 commit comments