Skip to content

WIP: Update cluster-api provider to use machineTemplate.status.nodeInfo for architecture-aware autoscale from zero #8345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
Original file line number Diff line number Diff line change
Expand Up @@ -204,17 +204,17 @@ func Test_allowedByAutoDiscoverySpec(t *testing.T) {
shouldMatch bool
}{{
name: "no clustername, namespace, or label selector specified should match any MachineSet",
testSpec: createTestSpec(RandomString(6), RandomString(6), RandomString(6), 1, false, nil, nil),
testSpec: createTestSpec(RandomString(6), RandomString(6), RandomString(6), 1, false, nil, nil, nil),
autoDiscoveryConfig: &clusterAPIAutoDiscoveryConfig{labelSelector: labels.NewSelector()},
shouldMatch: true,
}, {
name: "no clustername, namespace, or label selector specified should match any MachineDeployment",
testSpec: createTestSpec(RandomString(6), RandomString(6), RandomString(6), 1, true, nil, nil),
testSpec: createTestSpec(RandomString(6), RandomString(6), RandomString(6), 1, true, nil, nil, nil),
autoDiscoveryConfig: &clusterAPIAutoDiscoveryConfig{labelSelector: labels.NewSelector()},
shouldMatch: true,
}, {
name: "clustername specified does not match MachineSet, namespace matches, no labels specified",
testSpec: createTestSpec("default", RandomString(6), RandomString(6), 1, false, nil, nil),
testSpec: createTestSpec("default", RandomString(6), RandomString(6), 1, false, nil, nil, nil),
autoDiscoveryConfig: &clusterAPIAutoDiscoveryConfig{
clusterName: "foo",
namespace: "default",
Expand All @@ -223,7 +223,7 @@ func Test_allowedByAutoDiscoverySpec(t *testing.T) {
shouldMatch: false,
}, {
name: "clustername specified does not match MachineDeployment, namespace matches, no labels specified",
testSpec: createTestSpec("default", RandomString(6), RandomString(6), 1, true, nil, nil),
testSpec: createTestSpec("default", RandomString(6), RandomString(6), 1, true, nil, nil, nil),
autoDiscoveryConfig: &clusterAPIAutoDiscoveryConfig{
clusterName: "foo",
namespace: "default",
Expand All @@ -232,7 +232,7 @@ func Test_allowedByAutoDiscoverySpec(t *testing.T) {
shouldMatch: false,
}, {
name: "namespace specified does not match MachineSet, clusterName matches, no labels specified",
testSpec: createTestSpec(RandomString(6), "foo", RandomString(6), 1, false, nil, nil),
testSpec: createTestSpec(RandomString(6), "foo", RandomString(6), 1, false, nil, nil, nil),
autoDiscoveryConfig: &clusterAPIAutoDiscoveryConfig{
clusterName: "foo",
namespace: "default",
Expand All @@ -241,7 +241,7 @@ func Test_allowedByAutoDiscoverySpec(t *testing.T) {
shouldMatch: false,
}, {
name: "clustername specified does not match MachineDeployment, namespace matches, no labels specified",
testSpec: createTestSpec(RandomString(6), "foo", RandomString(6), 1, true, nil, nil),
testSpec: createTestSpec(RandomString(6), "foo", RandomString(6), 1, true, nil, nil, nil),
autoDiscoveryConfig: &clusterAPIAutoDiscoveryConfig{
clusterName: "foo",
namespace: "default",
Expand All @@ -250,7 +250,7 @@ func Test_allowedByAutoDiscoverySpec(t *testing.T) {
shouldMatch: false,
}, {
name: "namespace and clusterName matches MachineSet, no labels specified",
testSpec: createTestSpec("default", "foo", RandomString(6), 1, false, nil, nil),
testSpec: createTestSpec("default", "foo", RandomString(6), 1, false, nil, nil, nil),
autoDiscoveryConfig: &clusterAPIAutoDiscoveryConfig{
clusterName: "foo",
namespace: "default",
Expand All @@ -259,7 +259,7 @@ func Test_allowedByAutoDiscoverySpec(t *testing.T) {
shouldMatch: true,
}, {
name: "namespace and clusterName matches MachineDeployment, no labels specified",
testSpec: createTestSpec("default", "foo", RandomString(6), 1, true, nil, nil),
testSpec: createTestSpec("default", "foo", RandomString(6), 1, true, nil, nil, nil),
autoDiscoveryConfig: &clusterAPIAutoDiscoveryConfig{
clusterName: "foo",
namespace: "default",
Expand All @@ -268,7 +268,7 @@ func Test_allowedByAutoDiscoverySpec(t *testing.T) {
shouldMatch: true,
}, {
name: "namespace and clusterName matches MachineSet, does not match label selector",
testSpec: createTestSpec("default", "foo", RandomString(6), 1, false, nil, nil),
testSpec: createTestSpec("default", "foo", RandomString(6), 1, false, nil, nil, nil),
autoDiscoveryConfig: &clusterAPIAutoDiscoveryConfig{
clusterName: "foo",
namespace: "default",
Expand All @@ -277,7 +277,7 @@ func Test_allowedByAutoDiscoverySpec(t *testing.T) {
shouldMatch: false,
}, {
name: "namespace and clusterName matches MachineDeployment, does not match label selector",
testSpec: createTestSpec("default", "foo", RandomString(6), 1, true, nil, nil),
testSpec: createTestSpec("default", "foo", RandomString(6), 1, true, nil, nil, nil),
autoDiscoveryConfig: &clusterAPIAutoDiscoveryConfig{
clusterName: "foo",
namespace: "default",
Expand All @@ -286,7 +286,7 @@ func Test_allowedByAutoDiscoverySpec(t *testing.T) {
shouldMatch: false,
}, {
name: "namespace, clusterName, and label selector matches MachineSet",
testSpec: createTestSpec("default", "foo", RandomString(6), 1, false, nil, nil),
testSpec: createTestSpec("default", "foo", RandomString(6), 1, false, nil, nil, nil),
additionalLabels: map[string]string{"color": "green"},
autoDiscoveryConfig: &clusterAPIAutoDiscoveryConfig{
clusterName: "foo",
Expand All @@ -296,7 +296,7 @@ func Test_allowedByAutoDiscoverySpec(t *testing.T) {
shouldMatch: true,
}, {
name: "namespace, clusterName, and label selector matches MachineDeployment",
testSpec: createTestSpec("default", "foo", RandomString(6), 1, true, nil, nil),
testSpec: createTestSpec("default", "foo", RandomString(6), 1, true, nil, nil, nil),
additionalLabels: map[string]string{"color": "green"},
autoDiscoveryConfig: &clusterAPIAutoDiscoveryConfig{
clusterName: "foo",
Expand Down
Loading
Loading