Skip to content

Commit b17f420

Browse files
Fixing scale from zero if the nodeSelector of workload contains 'node.kubernetes.io/instance-type'
1 parent 3c6dd26 commit b17f420

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

cluster-autoscaler/cloudprovider/oci/common/oci_shape.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ func (osf *shapeGetterImpl) GetNodePoolShape(np *oke.NodePool, ephemeralStorage
8383
shapeName := *np.NodeShape
8484
if np.NodeShapeConfig != nil {
8585
return &Shape{
86+
Name: shapeName,
8687
CPU: *np.NodeShapeConfig.Ocpus * 2,
8788
// num_bytes * kilo * mega * giga
8889
MemoryInBytes: *np.NodeShapeConfig.MemoryInGBs * 1024 * 1024 * 1024,

cluster-autoscaler/cloudprovider/oci/common/oci_shape_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ func TestNodePoolGetShape(t *testing.T) {
9595
"basic shape": {
9696
shape: "VM.Standard1.2",
9797
expected: &Shape{
98+
Name: "VM.Standard1.2",
9899
CPU: 4,
99100
MemoryInBytes: 16 * 1024 * 1024 * 1024,
100101
GPU: 0,
@@ -108,6 +109,7 @@ func TestNodePoolGetShape(t *testing.T) {
108109
MemoryInGBs: common.Float32(64),
109110
},
110111
expected: &Shape{
112+
Name: "VM.Standard.E3.Flex",
111113
CPU: 8,
112114
MemoryInBytes: 4 * 16 * 1024 * 1024 * 1024,
113115
GPU: 0,

0 commit comments

Comments
 (0)