Support custom-endpoint in sidecar mounter#1316
Support custom-endpoint in sidecar mounter#1316uriel-guzman wants to merge 1 commit intoGoogleCloudPlatform:mainfrom
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: uriel-guzman The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Code Review
This pull request introduces support for a custom endpoint in the GCS Fuse CSI driver sidecar mounter. Changes include updating the ServiceManager interface and its implementations to accept a customEndpoint parameter, which is then used when initializing the storage client. A review comment highlights that the custom endpoint should also be applied to the control client to ensure consistency during the pre-mount phase.
| if customEndpoint != "" { | ||
| storageOpts = append(storageOpts, option.WithEndpoint(customEndpoint)) | ||
| } |
There was a problem hiding this comment.
The customEndpoint is currently only applied to the storageClient. However, the controlClient (initialized at line 476) is used for the CheckBucketExists call during the sidecar's pre-mount phase. If a custom endpoint is required for storage access, it is highly likely that the Storage Control API also needs to be directed to a corresponding custom endpoint. Failing to set this will cause the CheckBucketExists call to attempt to reach the default Google Cloud endpoints, which may fail or be blocked in restricted environments.
| if customEndpoint != "" { | |
| storageOpts = append(storageOpts, option.WithEndpoint(customEndpoint)) | |
| } | |
| if customEndpoint != "" { | |
| storageOpts = append(storageOpts, option.WithEndpoint(customEndpoint)) | |
| controlOpts = append(controlOpts, option.WithEndpoint(customEndpoint)) | |
| } |
dc2257a to
d6b1c87
Compare
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: