Last active
June 12, 2024 23:06
-
-
Save x95castle1/cdaf655d1e81c5d56d97c46f3ea10316 to your computer and use it in GitHub Desktop.
Overlay to update HPA Autoscaler Defaults for Tekton
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
#@ load("@ytt:overlay", "overlay") | |
#@overlay/match by=overlay.subset({"kind": "HorizontalPodAutoscaler", "metadata": {"name": "tekton-pipelines-webhook"}}), expects="1+" | |
--- | |
spec: | |
#@overlay/match missing_ok=True | |
maxReplicas: 20 | |
minReplicas: 10 | |
#@overlay/remove | |
metrics: | |
#@overlay/match by=overlay.subset({"kind": "HorizontalPodAutoscaler", "metadata": {"name": "tekton-pipelines-webhook"}}), expects="1+" | |
--- | |
spec: | |
#@overlay/match missing_ok=True | |
metrics: | |
- resource: | |
name: cpu | |
target: | |
averageUtilization: 90 | |
type: Utilization | |
type: Resource |
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
apiVersion: autoscaling/v2 | |
kind: HorizontalPodAutoscaler | |
metadata: | |
name: tekton-pipelines-webhook | |
namespace: tekton-pipelines | |
spec: | |
maxReplicas: 5 | |
metrics: | |
- resource: | |
name: cpu | |
target: | |
averageUtilization: 100 | |
type: Utilization | |
type: Resource | |
minReplicas: 1 | |
scaleTargetRef: | |
apiVersion: apps/v1 | |
kind: Deployment | |
name: tekton-pipelines-webhook |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment