_utils 776 B

123456789101112131415161718192021222324252627282930
  1. {{/*
  2. Retrieve deployment metadata
  3. */}}
  4. {{- define "common.deployment.metadata" -}}
  5. metadata:
  6. name: {{ template "common.names.fullname" . }}
  7. labels: {{ include "common.labels.selectorLabels" . | nindent 4 }}
  8. {{- end -}}
  9. {{/*
  10. Retrieve replicas/strategy/selector
  11. */}}
  12. {{- define "common.deployment.common_spec" -}}
  13. replicas: {{ (default 1 .Values.replicas) }}
  14. strategy:
  15. type: {{ (default "Recreate" .Values.strategyType ) }}
  16. selector:
  17. matchLabels: {{ include "common.labels.selectorLabels" . | nindent 4 }}
  18. {{- end -}}
  19. {{/*
  20. Retrieve deployment pod's metadata
  21. */}}
  22. {{- define "common.deployment.pod.metadata" -}}
  23. metadata:
  24. labels: {{ include "common.labels.selectorLabels" . | nindent 4 }}
  25. annotations: {{ include "common.annotations" . | nindent 4 }}
  26. {{- end -}}