Brak opisu

shuffle-worker-vpa.yaml 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. {{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1/VerticalPodAutoscaler") (and .Values.worker.enableHelmDeployment .Values.worker.autoscaling.vpa.enabled) }}
  2. apiVersion: autoscaling.k8s.io/v1
  3. kind: VerticalPodAutoscaler
  4. metadata:
  5. name: {{ include "shuffle.worker.name" . }}
  6. namespace: {{ include "common.names.namespace" . | quote }}
  7. labels: {{- include "shuffle.worker.labels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
  8. {{- if or .Values.worker.autoscaling.vpa.annotations .Values.commonAnnotations }}
  9. {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.worker.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: worker
  16. {{- with .Values.worker.autoscaling.vpa.controlledResources }}
  17. controlledResources:
  18. {{- toYaml . | nindent 8 }}
  19. {{- end }}
  20. {{- with .Values.worker.autoscaling.vpa.maxAllowed }}
  21. maxAllowed:
  22. {{- toYaml . | nindent 8 }}
  23. {{- end }}
  24. {{- with .Values.worker.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 "shuffle.worker.name" . }}
  32. {{- if .Values.worker.autoscaling.vpa.updatePolicy }}
  33. updatePolicy:
  34. {{- with .Values.worker.autoscaling.vpa.updatePolicy.updateMode }}
  35. updateMode: {{ . }}
  36. {{- end }}
  37. {{- end }}
  38. {{- end }}