Skip to content

Pass in hostname to create volume request #1285

@Rishita-Golla

Description

@Rishita-Golla

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions