-
Notifications
You must be signed in to change notification settings - Fork 159
Add compute-endpoint flag to pdcsi driver #1077
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
git status
|
Welcome @judemars! |
Hi @judemars. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
/retest |
@@ -36,6 +36,7 @@ import ( | |||
var ( | |||
cloudConfigFilePath = flag.String("cloud-config", "", "Path to GCE cloud provider config") | |||
endpoint = flag.String("endpoint", "unix:/tmp/csi.sock", "CSI endpoint") | |||
computeEndpoint = flag.String("compute-endpoint", "", "If set, used as the endpoint for the GCE API.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For safety, should we always fall back/default to the public GCE endpoint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If no endpoint is passed into the computebeta.NewService constructor, the default "https://compute.googleapis.com/compute/beta/" is used. This value is being used in the current implementation and the new.
[1]: see "basePath" in https://raw.githubusercontent.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/7592dc19d3bd000f34cf950454c3355ae35f1475/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go
Does it make sense to add an e2e test to confirm that passing an endpoint in actually works? IIUC currently no test (e2e or integration) will actually exercise this flag, so we run the risk of accidentally breaking it. |
/retest |
Alrighty @mattcary I added an e2e test. I couldn't find a way to pass in a valid endpoint and then verify the exact endpoint was passed through apart from just checking for success, but if you know of a way to check that met me know and I'll add it. I opted to go with:
|
Awesome, that's solid. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: judemars, mattcary The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds ability to pick up compute endpoint from compute-endpoint flag rather than using hard-coded value. This is needed to achieve service regionalization
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
This is my first change so still working out which tests to run.
Does this PR introduce a user-facing change?: