Нема описа

frontend-vpa.yaml 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. {{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1/VerticalPodAutoscaler") .Values.frontend.autoscaling.vpa.enabled }}
  2. apiVersion: autoscaling.k8s.io/v1
  3. kind: VerticalPodAutoscaler
  4. metadata:
  5. name: {{ include "shuffle.frontend.name" . }}
  6. namespace: {{ include "common.names.namespace" . | quote }}
  7. labels: {{- include "shuffle.frontend.labels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
  8. {{- if or .Values.frontend.autoscaling.vpa.annotations .Values.commonAnnotations }}
  9. {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.frontend.autoscaling.vpa.annotations .Values.commonAnnotations ) "context" . ) }}
  10. annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
  11. {{- end }}
  12. spec:
  13. resourcePolicy:
  14. containerPolicies:
  15. - containerName: frontend
  16. {{- with .Values.frontend.autoscaling.vpa.controlledResources }}
  17. controlledResources:
  18. {{- toYaml . | nindent 8 }}
  19. {{- end }}
  20. {{- with .Values.frontend.autoscaling.vpa.maxAllowed }}
  21. maxAllowed:
  22. {{- toYaml . | nindent 8 }}
  23. {{- end }}
  24. {{- with .Values.frontend.autoscaling.vpa.minAllowed }}
  25. minAllowed:
  26. {{- toYaml . | nindent 8 }}
  27. {{- end }}
  28. targetRef:
  29. apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
  30. kind: Deployment
  31. name: {{ include "frontend.names.name" . }}
  32. {{- if .Values.frontend.autoscaling.vpa.updatePolicy }}
  33. updatePolicy:
  34. {{- with .Values.frontend.autoscaling.vpa.updatePolicy.updateMode }}
  35. updateMode: {{ . }}
  36. {{- end }}
  37. {{- end }}
  38. {{- end }}