Skip to content

Commit cc9e7d8

Browse files
Merge pull request GoogleCloudPlatform#4710 from SwarnaBharathiMantena/swarnabm/gke_h4d_reservation
Add reservation, update taint in gke h4d blueprint, and update gke h4d test build with reservation info
2 parents ae06320 + 0cdd27c commit cc9e7d8

4 files changed

Lines changed: 21 additions & 3 deletions

File tree

examples/gke-h4d/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ This blueprint uses GKE to provision a Kubernetes cluster and a H4D node pool, a
2828
1. `zone`: Compute zone used for the deployment.
2929
1. `static_node_count`: Number of nodes to create.
3030
1. `authorized_cidr`: update the IP address in `<your-ip-address>/32`.
31+
1. `reservation`: The name of the compute engine reservation in the form of <reservation-name>. To target a BLOCK_NAME, the name of the extended reservation can be inputted as <reservation-name>/reservationBlocks/<reservation-block-name>.
32+
3133
1. Build the Cluster Toolkit binary
3234

3335
```sh

examples/gke-h4d/gke-h4d-deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,9 @@ vars:
3838
# Cidr block containing the IP of the machine calling terraform.
3939
# The following line must be updated for this example to work.
4040
authorized_cidr: IP_ADDRESS/SUFFIX
41+
42+
# The name of the compute engine reservation in the form of
43+
# <reservation-name>
44+
# To target a BLOCK_NAME, the name of the extended reservation
45+
# can be inputted as <reservation-name>/reservationBlocks/<reservation-block-name>
46+
reservation:

examples/gke-h4d/gke-h4d.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ vars:
3636
# The following line must be updated for this example to work.
3737
authorized_cidr:
3838

39+
# The name of the compute engine reservation in the form of
40+
# <reservation-name>
41+
# To target a BLOCK_NAME, the name of the extended reservation
42+
# can be inputted as <reservation-name>/reservationBlocks/<reservation-block-name>
43+
reservation:
44+
3945
system_node_pool_disk_size_gb: 100
4046
h4d_node_pool_disk_size_gb: 100
4147

@@ -115,8 +121,6 @@ deployment_groups:
115121
system_node_pool_taints: []
116122
enable_multi_networking: true
117123
enable_dcgm_monitoring: true
118-
enable_gcsfuse_csi: true
119-
cluster_availability_type: "ZONAL"
120124
enable_private_endpoint: false # Allows access from authorized public IPs
121125
configure_workload_identity_sa: true
122126
master_authorized_networks:
@@ -157,6 +161,10 @@ deployment_groups:
157161
zones: [$(vars.zone)]
158162
disk_size_gb: $(vars.h4d_node_pool_disk_size_gb)
159163
static_node_count: $(vars.static_node_count)
164+
reservation_affinity:
165+
consume_reservation_type: SPECIFIC_RESERVATION
166+
specific_reservations:
167+
- name: $(vars.reservation)
160168
taints:
161169
# (Optional, but suggested)
162170
# In order prevent scheduling of generic workloads onto the H4D nodepool,
@@ -171,7 +179,7 @@ deployment_groups:
171179
# effect: "NoSchedule"
172180
- key: node-type
173181
value: h4d
174-
effect: NoSchedule
182+
effect: NO_SCHEDULE
175183
placement_policy:
176184
type: COMPACT
177185
additional_networks:

tools/cloud-build/daily-tests/tests/gke-h4d.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ region: us-central1
2525
zone: us-central1-b
2626
remote_node: "{{ deployment_name }}-remote-node-0"
2727
static_node_count: 2
28+
reservation: h4d-9amhwllf9r5w4
2829
cli_deployment_vars:
2930
region: "{{ region }}"
3031
zone: "{{ zone }}"
3132
static_node_count: "{{ static_node_count }}"
33+
reservation: "{{ reservation }}"
3234
authorized_cidr: "{{ build_ip.stdout }}/32"
3335
custom_vars:
3436
project: "{{ project }}"

0 commit comments

Comments
 (0)