openinfrastructure / terraform-google-multinic

Connect two VPC networks with an auto-healing, auto-scaling group of IP router instances.
Apache License 2.0
10 stars 5 forks source link

Modify update policy to match GKE defaults #34

Closed jeffmccune closed 3 years ago

jeffmccune commented 3 years ago

Without this patch the instance group update policy does not align with GKE defaults. This patch changes the default policy to add one instance above the target instance size, wait for it to become healthy, then remove an instance from the group.

This change ensure capacity remains constant at the target level during a rolling update.

Verified:

gcloud compute instance-groups managed wait-until --stable multinic-v3-8ea6b9 --zone us-west1-a
Waiting for group to become stable, current operations: verifying: 1
Waiting for group to become stable, current operations: verifying: 1
Waiting for group to become stable, current operations: verifying: 1
Waiting for group to become stable, current operations: verifying: 1
Waiting for group to become stable, current operations: verifying: 1
Waiting for group to become stable
Waiting for group to become stable, current operations: deleting: 1
Waiting for group to become stable, current operations: deleting: 1
Waiting for group to become stable, current operations: deleting: 1
Group is stable

Resolves: #32 Resolves: #35