-
Notifications
You must be signed in to change notification settings - Fork 150
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
feat: Provide hostname for zonal disk insert API #1849
base: master
Are you sure you want to change the base?
Conversation
|
Welcome @Rishita-Golla! |
Hi @Rishita-Golla. 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-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Rishita-Golla The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
@@ -1596,12 +1596,12 @@ func (cloud *FakeCloudProviderInsertDiskErr) AddDiskForErr(volKey *meta.Key, err | |||
cloud.insertDiskErrors[volKey.String()] = err | |||
} | |||
|
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.
It would be nice to add some sort of test that we can actually fetch the PVC correctly. Otherwise we're relying only on the k8s integration tests, and it will be harder to catch a regression.
I'll have to think on how to do that, though. The local api server testing setup I usually use will be hard to use in this context. Maybe you can poke around k/k to see if there's a lightweight mock?
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.
True! I wanted to discuss about this, hence marked the PR as draft.
We could set up a mock client, but I'm not sure how useful/ how often it will be used in this repo. Will check in k/k if I find something.
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.
I think something where we can confirm the expected PVC query happens, and the returned name is correctly plumbed into the gcp insert request, would be enough.
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.
I'm thinking using this fake package will be a good idea. We can create a client with PVC resource and check the returned hostname. Let me know your thoughts on this.
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.
Yup, I think that should do the trick.
Be sure to have tests using this, and also when it's nil (ie the hostname flag is not set)
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.
Changes are not tested in staging yet due to a blocking issue. Updated the CL to include tests with fake-client and its imports.
@Rishita-Golla: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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-sigs/prow repository. I understand the commands that are listed here. |
d4db94a
to
514746d
Compare
CL contains changes to pass in hostname for zonal disk.insert API as a part of location hint field. Code changes for regional disk API will be part of future CLs.
514746d
to
ba2bb17
Compare
PR needs rebase. 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-sigs/prow repository. |
CL contains changes to pass in hostname for zonal disk.insert API as a part of location hint field. These changes are enabled behind a feature flag.
What type of PR is this?
What this PR does / why we need it:
To improve performance when provisioning PDs, we can optimize their placement by using the hostname of the VM. In case of delayed binding, since the VM is already known, we can use this information to pass hostname as a parameter to the driver's create volume requests. For PD creation, the hostname can be included in location hint field in the disks.insert call. This ensure the PD is created as close as possible to the VM, minimizing latency and cross-cell attachments.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Changes for regional disks will be part of future CLs.
Does this PR introduce a user-facing change?: