40 lines
1.6 KiB
YAML
40 lines
1.6 KiB
YAML
---
|
|
{{- if .Values.nodeAgent.autoScalingEnabled }}
|
|
apiVersion: "autoscaling.k8s.io/v1"
|
|
kind: VerticalPodAutoscaler
|
|
metadata:
|
|
name: {{ .Release.Name }}-node-agent-vpa
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{ include "stackstate-k8s-agent.global.extraLabels" . | indent 4 }}
|
|
annotations:
|
|
{{ include "stackstate-k8s-agent.global.extraAnnotations" . | indent 4 }}
|
|
spec:
|
|
targetRef:
|
|
apiVersion: "apps/v1"
|
|
kind: DaemonSet
|
|
name: {{ .Release.Name }}-node-agent
|
|
resourcePolicy:
|
|
containerPolicies:
|
|
- containerName: 'node-agent'
|
|
minAllowed:
|
|
cpu: {{ .Values.nodeAgent.scaling.autoscalerLimits.agent.minimum.cpu }}
|
|
memory: {{ .Values.nodeAgent.scaling.autoscalerLimits.agent.minimum.memory }}
|
|
maxAllowed:
|
|
cpu: {{ .Values.nodeAgent.scaling.autoscalerLimits.agent.maximum.cpu }}
|
|
memory: {{ .Values.nodeAgent.scaling.autoscalerLimits.agent.maximum.memory }}
|
|
controlledResources: ["cpu", "memory"]
|
|
controlledValues: RequestsAndLimits
|
|
- containerName: 'process-agent'
|
|
minAllowed:
|
|
cpu: {{ .Values.nodeAgent.scaling.autoscalerLimits.processAgent.minimum.cpu }}
|
|
memory: {{ .Values.nodeAgent.scaling.autoscalerLimits.processAgent.minimum.memory }}
|
|
maxAllowed:
|
|
cpu: {{ .Values.nodeAgent.scaling.autoscalerLimits.processAgent.maximum.cpu }}
|
|
memory: {{ .Values.nodeAgent.scaling.autoscalerLimits.processAgent.maximum.memory }}
|
|
controlledResources: ["cpu", "memory"]
|
|
controlledValues: RequestsAndLimits
|
|
updatePolicy:
|
|
updateMode: "Auto"
|
|
{{- end }}
|