Skip to content
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

Pass in hostname to create volume request #1285

Open
Rishita-Golla opened this issue Oct 11, 2024 · 1 comment
Open

Pass in hostname to create volume request #1285

Rishita-Golla opened this issue Oct 11, 2024 · 1 comment

Comments

@Rishita-Golla
Copy link

Rishita-Golla commented Oct 11, 2024

Is your feature request related to a problem?/Why is this needed
To improve performance when provisioning PDs in GCP, 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 (for Borg).

Describe the solution you'd like in detail
During dynamic PV provisioning, the K8s scheduler selects a node and sets [volume.kubernetes.io/selected-node] annotation on the PVC. As a possible solution, we can utilize the existing --extraCreateMetadata flag in external-provisioner, get hostname from the selected node annotation, and pass the hostname as an extra metadata parameter.
For PD, the hostname will be set as a part of location hint URI.

Reference CL [link] (#399)

Describe alternatives you've considered
We have considered adding hostname as a topology key. But this could lead to a potential scale issue as host name values are unique and the requisite/preferred topology generated could have upto n items, where n is no. of nodes in the cluster.

@msau42
Copy link
Collaborator

msau42 commented Oct 11, 2024

To clarify, the problem with the alternative solution is that adding "hostname" as a topology key would pose a problem with Immediate binding mode, where it would generate a topology entry per node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants