From 51a58f4bd0ef9124ea4bfc593c45f9f6c2d0337e Mon Sep 17 00:00:00 2001 From: justinsb Date: Sun, 27 Apr 2025 14:15:01 -0400 Subject: [PATCH] gce: set values for role labels This seems to be required to keep terraform from always recreating the instancegroup configuration (though that is likely a TF bug) --- pkg/model/gcemodel/autoscalinggroup.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/model/gcemodel/autoscalinggroup.go b/pkg/model/gcemodel/autoscalinggroup.go index 094182e6f5..e06044d5a8 100644 --- a/pkg/model/gcemodel/autoscalinggroup.go +++ b/pkg/model/gcemodel/autoscalinggroup.go @@ -184,11 +184,11 @@ func (b *AutoscalingGroupModelBuilder) buildInstanceTemplate(c *fi.CloudupModelB roleLabel := gce.GceLabelNameRolePrefix + ig.Spec.Role.ToLowerString() t.Labels = map[string]string{ clusterLabel.Key: clusterLabel.Value, - roleLabel: "", + roleLabel: ig.Spec.Role.ToLowerString(), gce.GceLabelNameInstanceGroup: ig.ObjectMeta.Name, } if ig.Spec.Role == kops.InstanceGroupRoleControlPlane { - t.Labels[gce.GceLabelNameRolePrefix+"master"] = "" + t.Labels[gce.GceLabelNameRolePrefix+"master"] = "master" } if gce.UsesIPAliases(b.Cluster) {