Skip to content

Commit

Permalink
Fixing scale from zero if the nodeSelector of workload contains 'node…
Browse files Browse the repository at this point in the history
….kubernetes.io/instance-type'
  • Loading branch information
robert-heinzmann-logmein committed Jul 1, 2024
1 parent 3c6dd26 commit b17f420
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions cluster-autoscaler/cloudprovider/oci/common/oci_shape.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func (osf *shapeGetterImpl) GetNodePoolShape(np *oke.NodePool, ephemeralStorage
shapeName := *np.NodeShape
if np.NodeShapeConfig != nil {
return &Shape{
Name: shapeName,
CPU: *np.NodeShapeConfig.Ocpus * 2,
// num_bytes * kilo * mega * giga
MemoryInBytes: *np.NodeShapeConfig.MemoryInGBs * 1024 * 1024 * 1024,
Expand Down
2 changes: 2 additions & 0 deletions cluster-autoscaler/cloudprovider/oci/common/oci_shape_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ func TestNodePoolGetShape(t *testing.T) {
"basic shape": {
shape: "VM.Standard1.2",
expected: &Shape{
Name: "VM.Standard1.2",
CPU: 4,
MemoryInBytes: 16 * 1024 * 1024 * 1024,
GPU: 0,
Expand All @@ -108,6 +109,7 @@ func TestNodePoolGetShape(t *testing.T) {
MemoryInGBs: common.Float32(64),
},
expected: &Shape{
Name: "VM.Standard.E3.Flex",
CPU: 8,
MemoryInBytes: 4 * 16 * 1024 * 1024 * 1024,
GPU: 0,
Expand Down

0 comments on commit b17f420

Please sign in to comment.