feat: add Dockerfile, Helm chart, Gitea Actions workflow
Some checks failed
Build & Push / build (push) Failing after 5m41s
Some checks failed
Build & Push / build (push) Failing after 5m41s
This commit is contained in:
50
web/charts/factorio-dashboard/templates/_helpers.tpl
Normal file
50
web/charts/factorio-dashboard/templates/_helpers.tpl
Normal file
@@ -0,0 +1,50 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "factorio-dashboard.name" -}}
|
||||
{{- .Chart.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a fully qualified app name.
|
||||
*/}}
|
||||
{{- define "factorio-dashboard.fullname" -}}
|
||||
{{- printf "%s" (include "factorio-dashboard.name" .) | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels.
|
||||
*/}}
|
||||
{{- define "factorio-dashboard.labels" -}}
|
||||
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
app.kubernetes.io/name: {{ include "factorio-dashboard.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels.
|
||||
*/}}
|
||||
{{- define "factorio-dashboard.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "factorio-dashboard.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Name of the secret that holds API_TOKEN and DATABASE_URL.
|
||||
*/}}
|
||||
{{- define "factorio-dashboard.secretName" -}}
|
||||
{{- if .Values.app.existingSecret }}
|
||||
{{- .Values.app.existingSecret }}
|
||||
{{- else }}
|
||||
{{- include "factorio-dashboard.fullname" . }}-secret
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Construct DATABASE_URL from db values.
|
||||
*/}}
|
||||
{{- define "factorio-dashboard.databaseUrl" -}}
|
||||
{{- printf "postgresql://%s:%s@%s-db:%d/%s" .Values.db.user .Values.db.password (include "factorio-dashboard.fullname" .) (int .Values.db.port) .Values.db.name }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user