Merge pull request #5222 from elmiko/capi-cleanup
cleanup unused constants in clusterapi provider
This commit is contained in:
commit
728bea6d4c
|
|
@ -584,29 +584,29 @@ func TestControllerFindMachine(t *testing.T) {
|
||||||
description string
|
description string
|
||||||
name string
|
name string
|
||||||
namespace string
|
namespace string
|
||||||
useDeprecatedAnnotation bool
|
useAnnotation bool
|
||||||
lookupSucceeds bool
|
lookupSucceeds bool
|
||||||
}
|
}
|
||||||
|
|
||||||
var testCases = []testCase{{
|
var testCases = []testCase{{
|
||||||
description: "lookup fails",
|
description: "lookup fails",
|
||||||
lookupSucceeds: false,
|
lookupSucceeds: false,
|
||||||
useDeprecatedAnnotation: false,
|
useAnnotation: false,
|
||||||
name: "machine-does-not-exist",
|
name: "machine-does-not-exist",
|
||||||
namespace: "namespace-does-not-exist",
|
namespace: "namespace-does-not-exist",
|
||||||
}, {
|
}, {
|
||||||
description: "lookup fails in valid namespace",
|
description: "lookup fails in valid namespace",
|
||||||
lookupSucceeds: false,
|
lookupSucceeds: false,
|
||||||
useDeprecatedAnnotation: false,
|
useAnnotation: false,
|
||||||
name: "machine-does-not-exist-in-existing-namespace",
|
name: "machine-does-not-exist-in-existing-namespace",
|
||||||
}, {
|
}, {
|
||||||
description: "lookup succeeds",
|
description: "lookup succeeds",
|
||||||
lookupSucceeds: true,
|
lookupSucceeds: true,
|
||||||
useDeprecatedAnnotation: false,
|
useAnnotation: false,
|
||||||
}, {
|
}, {
|
||||||
description: "lookup succeeds with deprecated annotation",
|
description: "lookup succeeds with annotation",
|
||||||
lookupSucceeds: true,
|
lookupSucceeds: true,
|
||||||
useDeprecatedAnnotation: true,
|
useAnnotation: true,
|
||||||
}}
|
}}
|
||||||
|
|
||||||
test := func(t *testing.T, tc testCase, testConfig *testConfig) {
|
test := func(t *testing.T, tc testCase, testConfig *testConfig) {
|
||||||
|
|
@ -644,7 +644,7 @@ func TestControllerFindMachine(t *testing.T) {
|
||||||
if tc.namespace == "" {
|
if tc.namespace == "" {
|
||||||
tc.namespace = testConfig.machines[0].GetNamespace()
|
tc.namespace = testConfig.machines[0].GetNamespace()
|
||||||
}
|
}
|
||||||
if tc.useDeprecatedAnnotation {
|
if tc.useAnnotation {
|
||||||
for i := range testConfig.machines {
|
for i := range testConfig.machines {
|
||||||
n := testConfig.nodes[i]
|
n := testConfig.nodes[i]
|
||||||
annotations := n.GetAnnotations()
|
annotations := n.GetAnnotations()
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
deprecatedNodeGroupMinSizeAnnotationKey = "cluster.k8s.io/cluster-api-autoscaler-node-group-min-size"
|
|
||||||
deprecatedNodeGroupMaxSizeAnnotationKey = "cluster.k8s.io/cluster-api-autoscaler-node-group-max-size"
|
|
||||||
deprecatedClusterNameLabel = "cluster.k8s.io/cluster-name"
|
|
||||||
|
|
||||||
cpuKey = "capacity.cluster-autoscaler.kubernetes.io/cpu"
|
cpuKey = "capacity.cluster-autoscaler.kubernetes.io/cpu"
|
||||||
memoryKey = "capacity.cluster-autoscaler.kubernetes.io/memory"
|
memoryKey = "capacity.cluster-autoscaler.kubernetes.io/memory"
|
||||||
gpuTypeKey = "capacity.cluster-autoscaler.kubernetes.io/gpu-type"
|
gpuTypeKey = "capacity.cluster-autoscaler.kubernetes.io/gpu-type"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue