fluxcd-flux2/cmd/flux/testdata/build-kustomization/delete-service/hpa.yaml
Soule BA 204a8fbbd7
Add test case on hpa metrics for flux build/diff
If implemented will detect any change on how ssa dry-run return diffs on
hpa metrics

Signed-off-by: Soule BA <soule@weave.works>
2022-02-02 17:15:57 +01:00

44 lines
937 B
YAML

apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: podinfo
spec:
behavior:
scaleDown:
policies:
- periodSeconds: 15
type: Percent
value: 99
selectPolicy: Max
stabilizationWindowSeconds: 60
scaleUp:
policies:
- periodSeconds: 15
type: Pods
value: 5
- periodSeconds: 15
type: Percent
value: 100
selectPolicy: Max
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: podinfo
minReplicas: 2
maxReplicas: 4
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
# scale up if usage is above
# 99% of the requested CPU (100m)
averageUtilization: 99
- type: Pods
pods:
metric:
name: podinfo_http_requests_total
target:
averageValue: "2"
type: AverageValue