Skip to content

Support for configuring Hyperdisk provisioned Throughput and IOPS #2327

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

Open
FearlessHyena opened this issue Apr 10, 2025 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@FearlessHyena
Copy link

FearlessHyena commented Apr 10, 2025

TL;DR

Since Hyperdisks allow you to specify the Throughput and IOPS that should be provisioned when creating them, it would be great if the node_pools property added support for them

Terraform Resources

Detailed design

Two new variables under the `node_pools` property would be needed which would only be used in case of Hyperdisks and ignored for Persistent disks. The [google_compute_disk resource] (https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_disk) can be used for reference
- disk_provisioned_iops
- disk_provisioned_throughput

There is also the [enable_confidential_compute](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_disk#enable_confidential_compute-1) property but not sure if it would be in scope of this feature request

Additional information

No response

@FearlessHyena FearlessHyena added the enhancement New feature or request label Apr 10, 2025
@DrFaust92
Copy link
Contributor

https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/hyperdisk#create according to docs its not directly related to the GKE config and needs to be done by creating a relevant storage class and setting it on relevant PVC:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: balanced-storage
provisioner: pd.csi.storage.gke.io
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true
parameters:
  type: hyperdisk-balanced
  provisioned-throughput-on-create: "250Mi"
  provisioned-iops-on-create: "7000"

and

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: podpvc
spec:
  accessModes:
  - ReadWriteOnce
  storageClassName: balanced-storage
  resources:
    requests:
      storage: 20Gi

and using that for your workloads
the above may differ based on your config.

as this is not a module issue I think it cant be closed

@FearlessHyena
Copy link
Author

Certain newer GCP instance types like the C4/C4D/C4A only support Hyperdisk volumes so when you create a nodepool with any of those instance types, the disk_type needs to be set to a hyperdisk variant like hyperdisk-balanced

I believe you don't need a PVC if you plan to use the Hyperdisk as ephemeral storage, as GKE automatically reserves part of the boot disk to serve as ephemeral storage for Pods
Unfortunately unless the Throughput/IOPS are explicitly specified, the default values are used which isn't ideal for many production environments

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

No branches or pull requests

2 participants