initial commit

This commit is contained in:
2025-10-01 11:01:48 +02:00
commit c5408f5e17
9 changed files with 169 additions and 0 deletions

31
helm/templates/_names.tpl Normal file
View File

@@ -0,0 +1,31 @@
{{/* We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). */}}
{{- define "common.names.chart" }}
{{ printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- define "common.names.name" }}
{{ default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- define "common.names.namespace" }}
{{ default .Release.Namespace .Values.namespaceOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- define "common.names.fullname" }}
{{- if .Values.fullnameOverride }}
{{ .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{ $name := default .Chart.Name .Values.nameOverride }}
{{- $releaseName := regexReplaceAll "(-?[^a-z\\d\\-])+-?" (lower .Release.Name) "-" }}
{{- if contains $name $releaseName }}
{{ $releaseName | trunc 63 | trimSuffix "-" }}
{{- else }}
{{ printf "%s-%s" $releaseName $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{- define "common.names.fullname.namespace" }}
{{ printf "%s-%s" (include "common.names.fullname" .) (include "common.names.namespace" .) | trunc 63 | trimSuffix "-" }}
{{- end }}