[DO-1377] rename chart

This commit is contained in:
Rustam Tagaev
2024-12-02 12:25:28 +03:00
parent f805045dcb
commit 596607b291
11 changed files with 35 additions and 47 deletions

View File

@@ -1,7 +1,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "myHelmChart.name" -}}
{{- define "openresty.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
@@ -10,7 +10,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "myHelmChart.fullname" -}}
{{- define "openresty.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
@@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "myHelmChart.chart" -}}
{{- define "openresty.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "myHelmChart.labels" -}}
helm.sh/chart: {{ include "myHelmChart.chart" . }}
{{ include "myHelmChart.selectorLabels" . }}
{{- define "openresty.labels" -}}
helm.sh/chart: {{ include "openresty.chart" . }}
{{ include "openresty.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
@@ -45,17 +45,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "myHelmChart.selectorLabels" -}}
app.kubernetes.io/name: {{ include "myHelmChart.name" . }}
{{- define "openresty.selectorLabels" -}}
app.kubernetes.io/name: {{ include "openresty.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "myHelmChart.serviceAccountName" -}}
{{- define "openresty.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "myHelmChart.fullname" .) .Values.serviceAccount.name }}
{{- default (include "openresty.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}