Created
April 25, 2023 05:35
-
-
Save reynldi/48050ffc634da87e2377d5b945da1c05 to your computer and use it in GitHub Desktop.
HPA Custom Metrics
This file contains hidden or 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
| {{- if .Values.autoscaling.enabled }} | |
| apiVersion: autoscaling/v2beta2 | |
| kind: HorizontalPodAutoscaler | |
| metadata: | |
| name: {{ .Values.image.name }} | |
| namespace: {{ .Values.namespace }} | |
| labels: | |
| app: {{ .Values.image.name }} | |
| spec: | |
| scaleTargetRef: | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| name: {{ .Values.image.name }} | |
| minReplicas: {{ .Values.autoscaling.minReplicas }} | |
| maxReplicas: {{ .Values.autoscaling.maxReplicas }} | |
| metrics: | |
| - type: Pods | |
| pods: | |
| metric: | |
| name: container_network_receive_bytes_per_second // see configmap for custom metrics definition | |
| target: | |
| type: AverageValue | |
| averageValue: 10000000 | |
| {{- end }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment