helm collabora kubernetes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.8 KiB

  1. {{/*
  2. Expand the name of the chart.
  3. */}}
  4. {{- define "collabora-online.name" -}}
  5. {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
  6. {{- end }}
  7. {{/*
  8. Create a default fully qualified app name.
  9. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
  10. If release name contains chart name it will be used as a full name.
  11. */}}
  12. {{- define "collabora-online.fullname" -}}
  13. {{- if .Values.fullnameOverride }}
  14. {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
  15. {{- else }}
  16. {{- $name := default .Chart.Name .Values.nameOverride }}
  17. {{- if contains $name .Release.Name }}
  18. {{- .Release.Name | trunc 63 | trimSuffix "-" }}
  19. {{- else }}
  20. {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
  21. {{- end }}
  22. {{- end }}
  23. {{- end }}
  24. {{/*
  25. Create chart name and version as used by the chart label.
  26. */}}
  27. {{- define "collabora-online.chart" -}}
  28. {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
  29. {{- end }}
  30. {{/*
  31. Common labels
  32. */}}
  33. {{- define "collabora-online.labels" -}}
  34. helm.sh/chart: {{ include "collabora-online.chart" . }}
  35. {{ include "collabora-online.selectorLabels" . }}
  36. {{- if .Chart.AppVersion }}
  37. app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
  38. {{- end }}
  39. app.kubernetes.io/managed-by: {{ .Release.Service }}
  40. {{- end }}
  41. {{/*
  42. Selector labels
  43. */}}
  44. {{- define "collabora-online.selectorLabels" -}}
  45. app.kubernetes.io/name: {{ include "collabora-online.name" . }}
  46. app.kubernetes.io/instance: {{ .Release.Name }}
  47. {{- end }}
  48. {{/*
  49. Create the name of the service account to use
  50. */}}
  51. {{- define "collabora-online.serviceAccountName" -}}
  52. {{- if .Values.serviceAccount.create }}
  53. {{- default (include "collabora-online.fullname" .) .Values.serviceAccount.name }}
  54. {{- else }}
  55. {{- default "default" .Values.serviceAccount.name }}
  56. {{- end }}
  57. {{- end }}