Skip to content
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

Add Node group maintenance policy #4097

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion products/compute/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7947,9 +7947,13 @@ objects:
The total number of nodes in the node group.
required: true
send_empty_value: true
- !ruby/object:Api::Type::String
name: 'maintenancePolicy'
description: |
Specifies how to handle instances when a node in the group undergoes maintenance. Set to one of: DEFAULT, RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The default value is DEFAULT.
default_value: DEFAULT
- !ruby/object:Api::Type::NestedObject
name: 'autoscalingPolicy'
min_version: beta
description: |
If you use sole-tenant nodes for your workloads, you can use the node
group autoscaler to automatically manage the sizes of your node groups.
Expand Down
1 change: 0 additions & 1 deletion products/compute/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
template_name: "soletenant-tmpl"
- !ruby/object:Provider::Terraform::Examples
name: "node_group_autoscaling_policy"
min_version: beta
primary_resource_id: "nodes"
vars:
group_name: "soletenant-group"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
resource "google_compute_node_template" "soletenant-tmpl" {
provider = google-beta
name = "<%= ctx[:vars]['template_name'] %>"
region = "us-central1"
node_type = "n1-node-96-624"
}

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"

maintenance_policy = "RESTART_IN_PLACE"
size = 1
node_template = google_compute_node_template.soletenant-tmpl.id
autoscaling_policy {
mode = "ON"
mode = "ONLY_SCALE_OUT"
min_nodes = 1
max_nodes = 10
}
Expand Down