_helpers-compactor.tpl 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. {{/*
  2. compactor fullname
  3. */}}
  4. {{- define "loki.compactorFullname" -}}
  5. {{ include "loki.fullname" . }}-compactor
  6. {{- end }}
  7. {{/*
  8. compactor common labels
  9. */}}
  10. {{- define "loki.compactorLabels" -}}
  11. {{ include "loki.labels" . }}
  12. app.kubernetes.io/component: compactor
  13. {{- end }}
  14. {{/*
  15. compactor selector labels
  16. */}}
  17. {{- define "loki.compactorSelectorLabels" -}}
  18. {{ include "loki.selectorLabels" . }}
  19. app.kubernetes.io/component: compactor
  20. {{- end }}
  21. {{/*
  22. compactor image
  23. */}}
  24. {{- define "loki.compactorImage" -}}
  25. {{- $dict := dict "loki" .Values.loki.image "service" .Values.compactor.image "global" .Values.global.image "defaultVersion" .Chart.AppVersion -}}
  26. {{- include "loki.lokiImage" $dict -}}
  27. {{- end }}
  28. {{/*
  29. compactor priority class name
  30. */}}
  31. {{- define "loki.compactorPriorityClassName" }}
  32. {{- $pcn := coalesce .Values.global.priorityClassName .Values.compactor.priorityClassName -}}
  33. {{- if $pcn }}
  34. priorityClassName: {{ $pcn }}
  35. {{- end }}
  36. {{- end }}
  37. {{/*
  38. Create the name of the compactor service account
  39. */}}
  40. {{- define "loki.compactorServiceAccountName" -}}
  41. {{- if .Values.compactor.serviceAccount.create -}}
  42. {{ default (print (include "loki.serviceAccountName" .) "-compactor") .Values.compactor.serviceAccount.name }}
  43. {{- else -}}
  44. {{ default (include "loki.serviceAccountName" .) .Values.compactor.serviceAccount.name }}
  45. {{- end -}}
  46. {{- end -}}