You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Cluster Toolkit - Code Review Style Guide for Gemini
2
+
3
+
When reviewing Pull Requests for the Google Cloud Cluster Toolkit, please adopt the persona of an expert Software Engineer. Your primary focus should be on ensuring changes enhance the project's long-term health. Prioritize the following:
4
+
5
+
***Technical Excellence:** Ensure code is well-structured, efficient, and follows best practices.
6
+
***Maintainability:** Code should be easy to understand, modify, and extend.
7
+
***Testing:** Changes must be well-tested. Encourage comprehensive unit and integration tests.
8
+
***Documentation:** Ensure documentation is updated, including in-code comments, module READMEs, and index files.
9
+
10
+
Pay close attention to the following specifics:
11
+
12
+
1.**Blueprint Authoring (YAML):**
13
+
* Ensure the `use` block is preferred for module dependencies within blueprints. Explicit variable linking (e.g., `setting = $(module.output)`) should only be used when necessary to resolve ambiguity.
14
+
* Verify that module sources are correct and the referenced modules exist.
15
+
* Check for logical grouping of modules within `deployment_groups`.
16
+
* Ensure variable usage is correct (e.g., `$(vars.name)`, `$(module.id.output)`).
17
+
* Validate the overall structure and syntax of the YAML blueprint.
18
+
19
+
2.**Terraform Module Development (HCL):**
20
+
* Verify module inputs and outputs are consistent and well-defined.
21
+
* Check for clear variable definitions in `variables.tf` with descriptions, types, and sensible defaults where applicable.
22
+
* Ensure resources within the module are logically structured.
23
+
* Encourage the use of best practices for writing clean and maintainable Terraform code.
24
+
* Ensure new modules are placed in the correct directory (`modules/` or `community/modules/`) and within the appropriate subdirectory (e.g., `compute`, `network`, `file-system`, `scheduler`, etc.).
25
+
26
+
3.**Go Language:**
27
+
* Follow standard Go idioms and best practices (e.g., error handling, naming).
28
+
* Ensure code is well-commented, especially public functions and complex logic.
29
+
* Check for test coverage for new or modified Go code.
30
+
31
+
4.**Documentation:**
32
+
***CRITICAL:** If new modules (core or community) are added, ensure they are added to the index in `modules/README.md`.
33
+
***CRITICAL:** If new examples (core or community) are added, ensure they are added to the index in `examples/README.md`.
34
+
* In-code comments should be clear and explain the *why* not just the *what*.
35
+
* Module `README.md` files should be clear and provide sufficient information on usage, inputs, and outputs.
36
+
37
+
5.**Testing:**
38
+
* New features or bug fixes should ideally be accompanied by tests.
39
+
* Tests should be clear and cover both happy paths and edge cases.
40
+
* Encourage the use of the existing testing frameworks and patterns within the project.
41
+
42
+
6.**PR Description:**
43
+
* The PR description should clearly explain the purpose of the change and the problem it solves.
44
+
* It should mention how the changes were tested.
45
+
46
+
7.**Structure:**
47
+
* Confirm adherence to the project structure (e.g., core vs. community).
48
+
49
+
By focusing on these areas, you can help maintain the quality and consistency of the Cluster Toolkit codebase.
*[Writing an HPC Blueprint](#writing-an-hpc-blueprint)
69
70
*[Blueprint Boilerplate](#blueprint-boilerplate)
@@ -1642,6 +1643,61 @@ This blueprint uses GKE to provision a Kubernetes cluster and a G4 node pool, al
1642
1643
1643
1644
[gke-g4]: ../examples/gke-g4
1644
1645
1646
+
### [netapp-volumes.yaml] ![core-badge]
1647
+
1648
+
This blueprint demonstrates how to provision NFS volumes as shared filesystems for compute VMs, using Google Cloud NetApp Volumes. It can be used as an alternative to FileStore in blueprints.
1649
+
1650
+
NetApp Volumes is a first-party Google service that provides NFS and/or SMB shared file-systems to VMs. It offers advanced data management capabilities and highly scalable capacity and performance.
1651
+
1652
+
NetApp Volume provides:
1653
+
1654
+
* robust support for NFSv3, NFSv4.x and SMB 2.1 and 3.x
* FlexCache: Caching of ONTAP-based volumes to provide high-throughput and low latency read access to compute clusters of on-premises data
1658
+
* [Auto-tiering](https://cloud.google.com/netapp/volumes/docs/configure-and-use/volumes/manage-auto-tiering) of unused data to optimse cost
1659
+
1660
+
Support for NetApp Volumes is split into two modules.
1661
+
1662
+
* **netapp-storage-pool** provisions a [storage pool](https://cloud.google.com/netapp/volumes/docs/configure-and-use/storage-pools/overview). Storage pools are pre-provisioned storage capacity containers which host volumes. A pool also defines fundamental properties of all the volumes within, like the region, the attached network, the [service level][service-levels], CMEK encryption, Active Directory and LDAP settings.
1663
+
* **netapp-volume** provisions a [volume](https://cloud.google.com/netapp/volumes/docs/configure-and-use/volumes/overview) inside an existing storage pool. A volume is a file-system which is shared using NFS or SMB. It provides advanced data management capabilities.
1664
+
1665
+
You can provision multiple volumes in a pool. For service levels Standard, Premium and Extreme the throughput capability depends on volume size and service level. Every GiB of provisioned volume space adds 16/64/128 KiBps of throughput capability.
0 commit comments