2024-02-19 20:58:25 +00:00
|
|
|
{{- define "open-webui.name" -}}
|
|
|
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{- define "ollama.name" -}}
|
|
|
|
ollama
|
|
|
|
{{- end -}}
|
2024-02-19 21:23:36 +00:00
|
|
|
|
2024-02-19 22:32:50 +00:00
|
|
|
{{- define "ollama.url" -}}
|
2024-04-09 04:43:08 +00:00
|
|
|
{{- if .Values.ollama.externalHost }}
|
|
|
|
{{- printf .Values.ollama.externalHost }}
|
|
|
|
{{- else }}
|
2024-04-04 21:57:32 +00:00
|
|
|
{{- printf "http://%s.%s.svc.cluster.local:%d/" (include "ollama.name" .) (.Release.Namespace) (.Values.ollama.service.port | int) }}
|
2024-02-19 22:32:50 +00:00
|
|
|
{{- end }}
|
2024-04-09 04:43:08 +00:00
|
|
|
{{- end }}
|
2024-02-19 22:32:50 +00:00
|
|
|
|
2024-02-19 21:23:36 +00:00
|
|
|
{{- define "chart.name" -}}
|
|
|
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- define "base.labels" -}}
|
|
|
|
helm.sh/chart: {{ include "chart.name" . }}
|
|
|
|
{{- if .Chart.AppVersion }}
|
|
|
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
|
|
|
{{- end }}
|
|
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- define "base.selectorLabels" -}}
|
|
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{- define "open-webui.selectorLabels" -}}
|
|
|
|
{{ include "base.selectorLabels" . }}
|
|
|
|
app.kubernetes.io/component: {{ .Chart.Name }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- define "open-webui.labels" -}}
|
|
|
|
{{ include "base.labels" . }}
|
|
|
|
{{ include "open-webui.selectorLabels" . }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- define "ollama.selectorLabels" -}}
|
|
|
|
{{ include "base.selectorLabels" . }}
|
|
|
|
app.kubernetes.io/component: {{ include "ollama.name" . }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- define "ollama.labels" -}}
|
|
|
|
{{ include "base.labels" . }}
|
|
|
|
{{ include "ollama.selectorLabels" . }}
|
|
|
|
{{- end }}
|