選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

_helpers.tpl 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {{/*
  2. Expand the name of the chart.
  3. */}}
  4. {{- define "ragflow.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 "ragflow.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 "ragflow.chart" -}}
  28. {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
  29. {{- end }}
  30. {{/*
  31. Common labels
  32. */}}
  33. {{- define "ragflow.labels" -}}
  34. helm.sh/chart: {{ include "ragflow.chart" . }}
  35. {{ include "ragflow.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 "ragflow.selectorLabels" -}}
  45. app.kubernetes.io/name: {{ include "ragflow.name" . }}
  46. app.kubernetes.io/instance: {{ .Release.Name }}
  47. {{- end }}
  48. {{/*
  49. Create the name of the service account to use
  50. */}}
  51. {{- define "ragflow.serviceAccountName" -}}
  52. {{- if .Values.serviceAccount.create }}
  53. {{- default (include "ragflow.fullname" .) .Values.serviceAccount.name }}
  54. {{- else }}
  55. {{- default "default" .Values.serviceAccount.name }}
  56. {{- end }}
  57. {{- end }}