diff --git a/.chloggen/bug-fix-hpa.yaml b/.chloggen/bug-fix-hpa.yaml new file mode 100755 index 0000000000..adc23e56a6 --- /dev/null +++ b/.chloggen/bug-fix-hpa.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. collector, target allocator, auto-instrumentation, opamp, github action) +component: collector + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: adds test for memory utilization + +# One or more tracking issues related to the change +issues: [3283] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/tests/e2e-autoscale/autoscale/00-assert.yaml b/tests/e2e-autoscale/autoscale/00-assert.yaml index 87a41c51c7..11de1faab0 100644 --- a/tests/e2e-autoscale/autoscale/00-assert.yaml +++ b/tests/e2e-autoscale/autoscale/00-assert.yaml @@ -61,12 +61,17 @@ spec: minReplicas: 1 maxReplicas: 2 metrics: - - type: Resource - resource: - name: cpu + - resource: + name: memory target: + averageUtilization: 99 type: Utilization + type: Resource + - resource: + name: cpu + target: averageUtilization: 99 + type: Utilization behavior: scaleUp: stabilizationWindowSeconds: 300 diff --git a/tests/e2e-autoscale/autoscale/00-install.yaml b/tests/e2e-autoscale/autoscale/00-install.yaml index b442d36735..420fac9dee 100644 --- a/tests/e2e-autoscale/autoscale/00-install.yaml +++ b/tests/e2e-autoscale/autoscale/00-install.yaml @@ -54,6 +54,7 @@ spec: maxReplicas: 2 autoscaler: targetCPUUtilization: 99 + targetMemoryUtilization: 99 behavior: scaleUp: stabilizationWindowSeconds: 300 diff --git a/tests/e2e-autoscale/autoscale/01-assert.yaml b/tests/e2e-autoscale/autoscale/01-assert.yaml index 1266fdf2ea..b1252381eb 100644 --- a/tests/e2e-autoscale/autoscale/01-assert.yaml +++ b/tests/e2e-autoscale/autoscale/01-assert.yaml @@ -10,12 +10,18 @@ spec: minReplicas: 1 maxReplicas: 2 metrics: - - type: Resource - resource: - name: cpu + - resource: + name: memory target: + averageUtilization: 60 type: Utilization + type: Resource + - resource: + name: cpu + target: averageUtilization: 60 + type: Utilization + type: Resource behavior: scaleUp: stabilizationWindowSeconds: 1 diff --git a/tests/e2e-autoscale/autoscale/01-install.yaml b/tests/e2e-autoscale/autoscale/01-install.yaml index 92aca528a8..05bd5354c7 100644 --- a/tests/e2e-autoscale/autoscale/01-install.yaml +++ b/tests/e2e-autoscale/autoscale/01-install.yaml @@ -10,6 +10,7 @@ spec: maxReplicas: 2 autoscaler: targetCPUUtilization: 60 + targetMemoryUtilization: 60 # Without this behavior the HPA will default to a scaledown stabilization # window of 300 seconds. Tests should fail if this update is not successful. behavior: