Skip to content
Open
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
30 changes: 18 additions & 12 deletions tests/integration/update_cluster/ha_gce/kubernetes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,9 @@ resource "google_compute_instance_group_manager" "a-master-us-test1-a-ha-gce-exa
name = "a-master-us-test1-a-ha-gce-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.master-us-test1-a-ha-gce-example-com.self_link
Expand All @@ -519,8 +520,9 @@ resource "google_compute_instance_group_manager" "a-nodes-ha-gce-example-com" {
name = "a-nodes-ha-gce-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.nodes-ha-gce-example-com.self_link
Expand All @@ -537,8 +539,9 @@ resource "google_compute_instance_group_manager" "b-master-us-test1-b-ha-gce-exa
name = "b-master-us-test1-b-ha-gce-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.master-us-test1-b-ha-gce-example-com.self_link
Expand All @@ -555,8 +558,9 @@ resource "google_compute_instance_group_manager" "b-nodes-ha-gce-example-com" {
name = "b-nodes-ha-gce-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.nodes-ha-gce-example-com.self_link
Expand All @@ -573,8 +577,9 @@ resource "google_compute_instance_group_manager" "c-master-us-test1-c-ha-gce-exa
name = "c-master-us-test1-c-ha-gce-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.master-us-test1-c-ha-gce-example-com.self_link
Expand All @@ -591,8 +596,9 @@ resource "google_compute_instance_group_manager" "c-nodes-ha-gce-example-com" {
name = "c-nodes-ha-gce-example-com"
target_size = 0
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.nodes-ha-gce-example-com.self_link
Expand Down
10 changes: 6 additions & 4 deletions tests/integration/update_cluster/many-addons-gce/kubernetes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,9 @@ resource "google_compute_instance_group_manager" "a-master-us-test1-a-minimal-ex
name = "a-master-us-test1-a-minimal-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.master-us-test1-a-minimal-example-com.self_link
Expand All @@ -447,8 +448,9 @@ resource "google_compute_instance_group_manager" "a-nodes-minimal-example-com" {
name = "a-nodes-minimal-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.nodes-minimal-example-com.self_link
Expand Down
15 changes: 9 additions & 6 deletions tests/integration/update_cluster/minimal_gce/kubernetes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,9 @@ resource "google_compute_instance_group_manager" "a-master-us-test1-a-minimal-gc
name = "a-master-us-test1-a-minimal-gce-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.master-us-test1-a-minimal-gce-example-com.self_link
Expand All @@ -415,8 +416,9 @@ resource "google_compute_instance_group_manager" "a-nodes-minimal-gce-example-co
name = "a-nodes-minimal-gce-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.nodes-minimal-gce-example-com.self_link
Expand All @@ -433,8 +435,9 @@ resource "google_compute_instance_group_manager" "b-nodes-minimal-gce-example-co
name = "b-nodes-minimal-gce-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.nodes-minimal-gce-example-com.self_link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,9 @@ resource "google_compute_instance_group_manager" "a-master-us-test1-a-minimal-gc
name = "a-master-us-test1-a-minimal-gce-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.master-us-test1-a-minimal-gce-example-com.self_link
Expand All @@ -487,8 +488,9 @@ resource "google_compute_instance_group_manager" "a-nodes-minimal-gce-example-co
name = "a-nodes-minimal-gce-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.nodes-minimal-gce-example-com.self_link
Expand All @@ -505,8 +507,9 @@ resource "google_compute_instance_group_manager" "b-nodes-minimal-gce-example-co
name = "b-nodes-minimal-gce-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.nodes-minimal-gce-example-com.self_link
Expand Down
15 changes: 9 additions & 6 deletions tests/integration/update_cluster/minimal_gce_ilb/kubernetes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,9 @@ resource "google_compute_instance_group_manager" "a-master-us-test1-a-minimal-gc
name = "a-master-us-test1-a-minimal-gce-ilb-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.master-us-test1-a-minimal-gce-ilb-example-com.self_link
Expand All @@ -456,8 +457,9 @@ resource "google_compute_instance_group_manager" "a-nodes-minimal-gce-ilb-exampl
name = "a-nodes-minimal-gce-ilb-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.nodes-minimal-gce-ilb-example-com.self_link
Expand All @@ -474,8 +476,9 @@ resource "google_compute_instance_group_manager" "b-nodes-minimal-gce-ilb-exampl
name = "b-nodes-minimal-gce-ilb-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.nodes-minimal-gce-ilb-example-com.self_link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,9 @@ resource "google_compute_instance_group_manager" "a-master-us-test1-a-minimal-gc
name = "a-master-us-test1-a-minimal-gce-with-a-very-very-very-ve-j0fh8f"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.master-us-test1-a-minimal-gce-with-a-very-very-very-very-very-long-name-example-com.self_link
Expand All @@ -456,8 +457,9 @@ resource "google_compute_instance_group_manager" "a-nodes-minimal-gce-with-a-ver
name = "a-nodes-minimal-gce-with-a-very-very-very-very-very-long-qk78uj"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.nodes-minimal-gce-with-a-very-very-very-very-very-long-name-example-com.self_link
Expand All @@ -474,8 +476,9 @@ resource "google_compute_instance_group_manager" "b-nodes-minimal-gce-with-a-ver
name = "b-nodes-minimal-gce-with-a-very-very-very-very-very-long-h6o2lg"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.nodes-minimal-gce-with-a-very-very-very-very-very-long-name-example-com.self_link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,9 @@ resource "google_compute_instance_group_manager" "a-master-us-test1-a-minimal-gc
name = "a-master-us-test1-a-minimal-gce-with-a-very-very-very-ve-j0fh8f"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.master-us-test1-a-minimal-gce-with-a-very-very-very-very-very-long-name-example-com.self_link
Expand All @@ -423,8 +424,9 @@ resource "google_compute_instance_group_manager" "a-nodes-minimal-gce-with-a-ver
name = "a-nodes-minimal-gce-with-a-very-very-very-very-very-long-qk78uj"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.nodes-minimal-gce-with-a-very-very-very-very-very-long-name-example-com.self_link
Expand All @@ -441,8 +443,9 @@ resource "google_compute_instance_group_manager" "b-nodes-minimal-gce-with-a-ver
name = "b-nodes-minimal-gce-with-a-very-very-very-very-very-long-h6o2lg"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.nodes-minimal-gce-with-a-very-very-very-very-very-long-name-example-com.self_link
Expand Down
15 changes: 9 additions & 6 deletions tests/integration/update_cluster/minimal_gce_plb/kubernetes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,9 @@ resource "google_compute_instance_group_manager" "a-master-us-test1-a-minimal-gc
target_pools = [google_compute_target_pool.api-minimal-gce-plb-example-com.self_link]
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.master-us-test1-a-minimal-gce-plb-example-com.self_link
Expand All @@ -480,8 +481,9 @@ resource "google_compute_instance_group_manager" "a-nodes-minimal-gce-plb-exampl
name = "a-nodes-minimal-gce-plb-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.nodes-minimal-gce-plb-example-com.self_link
Expand All @@ -498,8 +500,9 @@ resource "google_compute_instance_group_manager" "b-nodes-minimal-gce-plb-exampl
name = "b-nodes-minimal-gce-plb-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.nodes-minimal-gce-plb-example-com.self_link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,9 @@ resource "google_compute_instance_group_manager" "a-master-us-test1-a-minimal-gc
name = "a-master-us-test1-a-minimal-gce-private-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.master-us-test1-a-minimal-gce-private-example-com.self_link
Expand All @@ -423,8 +424,9 @@ resource "google_compute_instance_group_manager" "a-nodes-minimal-gce-private-ex
name = "a-nodes-minimal-gce-private-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.nodes-minimal-gce-private-example-com.self_link
Expand All @@ -441,8 +443,9 @@ resource "google_compute_instance_group_manager" "b-nodes-minimal-gce-private-ex
name = "b-nodes-minimal-gce-private-example-com"
target_size = 1
update_policy {
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
max_unavailable_fixed = 1
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = google_compute_instance_template.nodes-minimal-gce-private-example-com.self_link
Expand Down
10 changes: 5 additions & 5 deletions upup/pkg/fi/cloudup/gcetasks/instancegroupmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ type terraformInstanceGroupManager struct {
}

type terraformUpdatePolicy struct {
MinimalAction string `cty:"minimal_action"`
MaxUnavailableFixed int `cty:"max_unavailable_fixed"`
Type string `cty:"type"`
MinimalAction string `cty:"minimal_action"`
MaxUnavailableFixed int `cty:"max_unavailable_fixed"`
Type string `cty:"type"`
}

type terraformVersion struct {
Expand All @@ -221,9 +221,9 @@ func (_ *InstanceGroupManager) RenderTerraform(t *terraform.TerraformTarget, a,
}
if policy := e.UpdatePolicy; policy != nil {
tf.UpdatePolicy = &terraformUpdatePolicy{
MinimalAction: policy.MinimalAction,
MinimalAction: policy.MinimalAction,
MaxUnavailableFixed: 1,
Type: policy.Type,
Type: policy.Type,
}
}
tf.Version = &terraformVersion{
Expand Down
Loading