github.com/Racer159/jackal@v0.32.7-0.20240401174413-0bd2339e4f2e/packages/jackal-registry/chart/templates/_helpers.tpl (about)

     1  {{/* vim: set filetype=mustache: */}}
     2  {{/*
     3  Expand the name of the chart.
     4  */}}
     5  {{- define "docker-registry.name" -}}
     6  {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
     7  {{- end -}}
     8  
     9  {{/*
    10  Create a default fully qualified app name.
    11  We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
    12  */}}
    13  {{- define "docker-registry.fullname" -}}
    14  {{- if .Values.fullnameOverride -}}
    15  {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
    16  {{- else -}}
    17  {{- $name := default .Chart.Name .Values.nameOverride -}}
    18  {{- if contains $name .Release.Name -}}
    19  {{- .Release.Name | trunc 63 | trimSuffix "-" -}}
    20  {{- else -}}
    21  {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
    22  {{- end -}}
    23  {{- end -}}
    24  {{- end -}}
    25  
    26  {{/*
    27  Merge all configmaps
    28  */}}
    29  {{- define "docker-registry.configMaps" -}}
    30  {{- if .Values.caBundle }}
    31  - name: {{ template "docker-registry.fullname" . }}-ca-bundle
    32    data:
    33      ca-certificates.crt: |
    34  {{ .Values.caBundle | indent 6 }}
    35  {{- end }}
    36  {{- end -}}