-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug: not scaling up from 0 replicas using hpa (#544)
* bug: not scaling up from 0 replicas using hpa * clean up logic a bit
- Loading branch information
Showing
5 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
tests/application/hpa/patch-application-scale-up-from-0-assert.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: test-deployment-hpa | ||
spec: | ||
replicas: 2 | ||
|
||
--- | ||
apiVersion: autoscaling/v2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: test-deployment-hpa | ||
spec: | ||
minReplicas: 2 | ||
maxReplicas: 4 | ||
metrics: | ||
- resource: | ||
name: cpu | ||
target: | ||
averageUtilization: 200 | ||
type: Utilization | ||
type: Resource | ||
scaleTargetRef: | ||
kind: Deployment | ||
apiVersion: apps/v1 | ||
name: test-deployment-hpa | ||
|
11 changes: 11 additions & 0 deletions
11
tests/application/hpa/patch-application-scale-up-from-0.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: skiperator.kartverket.no/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: test-deployment-hpa | ||
spec: | ||
image: image | ||
port: 8080 | ||
replicas: | ||
min: 2 | ||
max: 4 | ||
targetCpuUtilization: 200 |