rancher-partner-charts/charts/stackstate/stackstate-k8s-agent/1.0.67/templates/node-agent-podautoscaler.yaml

36 lines
1.4 KiB
YAML

---
{{- if .Values.nodeAgent.autoScalingEnabled }}
apiVersion: "autoscaling.k8s.io/v1"
kind: VerticalPodAutoscaler
metadata:
name: {{ .Release.Name }}-node-agent-vpa
namespace: {{ .Release.Namespace }}
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 }}