Skip to content

Commit

Permalink
Maintenance interval for sole-tenant node groups. (#9307)
Browse files Browse the repository at this point in the history
Co-authored-by: Igor Dyczko <[email protected]>
  • Loading branch information
idyczko and Igor Dyczko authored Oct 24, 2023
1 parent 041ab8c commit a67d6a3
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
18 changes: 18 additions & 0 deletions mmv1/products/compute/NodeGroup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ examples:
vars:
group_name: 'soletenant-group'
template_name: 'soletenant-tmpl'
- !ruby/object:Provider::Terraform::Examples
name: 'node_group_maintenance_interval'
min_version: beta
primary_resource_id: 'nodes'
vars:
group_name: 'soletenant-group'
template_name: 'soletenant-tmpl'
- !ruby/object:Provider::Terraform::Examples
name: 'node_group_autoscaling_policy'
primary_resource_id: 'nodes'
Expand Down Expand Up @@ -196,3 +203,14 @@ properties:
required: true
description: |
The project id/number should be the same as the key of this project config in the project map.
- !ruby/object:Api::Type::Enum
name: 'maintenanceInterval'
min_version: beta
description: |
Specifies the frequency of planned maintenance events. Set to one of the following:
- AS_NEEDED: Hosts are eligible to receive infrastructure and hypervisor updates as they become available.
- RECURRENT: Hosts receive planned infrastructure and hypervisor updates on a periodic basis, but not more frequently than every 28 days. This minimizes the number of planned maintenance operations on individual hosts and reduces the frequency of disruptions, both live migrations and terminations, on individual VMs.
values:
- :AS_NEEDED
- :RECURRENT
default_from_api: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
resource "google_compute_node_template" "soletenant-tmpl" {
provider = google-beta
name = "<%= ctx[:vars]['template_name'] %>"
region = "us-central1"
node_type = "c2-node-60-240"
}

resource "google_compute_node_group" "<%= ctx[:primary_resource_id] %>" {
provider = google-beta
name = "<%= ctx[:vars]['group_name'] %>"
zone = "us-central1-a"
description = "example google_compute_node_group for Terraform Google Provider"

initial_size = 1
node_template = google_compute_node_template.soletenant-tmpl.id

maintenance_interval = "RECURRENT"
}

0 comments on commit a67d6a3

Please sign in to comment.