mirror of https://github.com/kubernetes/kops.git
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)
This commit is contained in:
parent
46a8ffe24d
commit
51a58f4bd0
|
@ -184,11 +184,11 @@ func (b *AutoscalingGroupModelBuilder) buildInstanceTemplate(c *fi.CloudupModelB
|
||||||
roleLabel := gce.GceLabelNameRolePrefix + ig.Spec.Role.ToLowerString()
|
roleLabel := gce.GceLabelNameRolePrefix + ig.Spec.Role.ToLowerString()
|
||||||
t.Labels = map[string]string{
|
t.Labels = map[string]string{
|
||||||
clusterLabel.Key: clusterLabel.Value,
|
clusterLabel.Key: clusterLabel.Value,
|
||||||
roleLabel: "",
|
roleLabel: ig.Spec.Role.ToLowerString(),
|
||||||
gce.GceLabelNameInstanceGroup: ig.ObjectMeta.Name,
|
gce.GceLabelNameInstanceGroup: ig.ObjectMeta.Name,
|
||||||
}
|
}
|
||||||
if ig.Spec.Role == kops.InstanceGroupRoleControlPlane {
|
if ig.Spec.Role == kops.InstanceGroupRoleControlPlane {
|
||||||
t.Labels[gce.GceLabelNameRolePrefix+"master"] = ""
|
t.Labels[gce.GceLabelNameRolePrefix+"master"] = "master"
|
||||||
}
|
}
|
||||||
|
|
||||||
if gce.UsesIPAliases(b.Cluster) {
|
if gce.UsesIPAliases(b.Cluster) {
|
||||||
|
|
Loading…
Reference in New Issue