cloud node controller: apply stable instance-type label with backfill to existing nodes
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
This commit is contained in:
@@ -689,12 +689,15 @@ func Test_reconcileNodeLabels(t *testing.T) {
|
||||
labels: map[string]string{
|
||||
v1.LabelZoneFailureDomain: "foo",
|
||||
v1.LabelZoneRegion: "bar",
|
||||
v1.LabelInstanceType: "the-best-type",
|
||||
},
|
||||
expectedLabels: map[string]string{
|
||||
v1.LabelZoneFailureDomain: "foo",
|
||||
v1.LabelZoneRegion: "bar",
|
||||
v1.LabelZoneFailureDomainStable: "foo",
|
||||
v1.LabelZoneRegionStable: "bar",
|
||||
v1.LabelInstanceType: "the-best-type",
|
||||
v1.LabelInstanceTypeStable: "the-best-type",
|
||||
},
|
||||
expectedErr: nil,
|
||||
},
|
||||
@@ -705,12 +708,16 @@ func Test_reconcileNodeLabels(t *testing.T) {
|
||||
v1.LabelZoneRegion: "bar",
|
||||
v1.LabelZoneFailureDomainStable: "foo",
|
||||
v1.LabelZoneRegionStable: "bar",
|
||||
v1.LabelInstanceType: "the-best-type",
|
||||
v1.LabelInstanceTypeStable: "the-best-type",
|
||||
},
|
||||
expectedLabels: map[string]string{
|
||||
v1.LabelZoneFailureDomain: "foo",
|
||||
v1.LabelZoneRegion: "bar",
|
||||
v1.LabelZoneFailureDomainStable: "foo",
|
||||
v1.LabelZoneRegionStable: "bar",
|
||||
v1.LabelInstanceType: "the-best-type",
|
||||
v1.LabelInstanceTypeStable: "the-best-type",
|
||||
},
|
||||
expectedErr: nil,
|
||||
},
|
||||
@@ -721,12 +728,16 @@ func Test_reconcileNodeLabels(t *testing.T) {
|
||||
v1.LabelZoneRegion: "bar",
|
||||
v1.LabelZoneFailureDomainStable: "wrongfoo",
|
||||
v1.LabelZoneRegionStable: "wrongbar",
|
||||
v1.LabelInstanceType: "the-best-type",
|
||||
v1.LabelInstanceTypeStable: "the-wrong-type",
|
||||
},
|
||||
expectedLabels: map[string]string{
|
||||
v1.LabelZoneFailureDomain: "foo",
|
||||
v1.LabelZoneRegion: "bar",
|
||||
v1.LabelZoneFailureDomainStable: "foo",
|
||||
v1.LabelZoneRegionStable: "bar",
|
||||
v1.LabelInstanceType: "the-best-type",
|
||||
v1.LabelInstanceTypeStable: "the-best-type",
|
||||
},
|
||||
expectedErr: nil,
|
||||
},
|
||||
|
Reference in New Issue
Block a user