mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-23 21:40:20 +00:00
120 lines
4.3 KiB
Smarty
120 lines
4.3 KiB
Smarty
|
{{/* vim: set filetype=mustache: */}}
|
||
|
{{/*
|
||
|
Expand the name of the chart.
|
||
|
*/}}
|
||
|
{{- define "ceph-csi-rbd.name" -}}
|
||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||
|
{{- end -}}
|
||
|
|
||
|
{{/*
|
||
|
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 "ceph-csi-rbd.fullname" -}}
|
||
|
{{- if .Values.fullnameOverride -}}
|
||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||
|
{{- else -}}
|
||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||
|
{{- if contains $name .Release.Name -}}
|
||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||
|
{{- else -}}
|
||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||
|
{{- end -}}
|
||
|
{{- end -}}
|
||
|
{{- end -}}
|
||
|
|
||
|
{{/*
|
||
|
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 "ceph-csi-rbd.attacher.fullname" -}}
|
||
|
{{- if .Values.attacher.fullnameOverride -}}
|
||
|
{{- .Values.attacher.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||
|
{{- else -}}
|
||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||
|
{{- if contains $name .Release.Name -}}
|
||
|
{{- printf "%s-%s" .Release.Name .Values.attacher.name | trunc 63 | trimSuffix "-" -}}
|
||
|
{{- else -}}
|
||
|
{{- printf "%s-%s-%s" .Release.Name $name .Values.attacher.name | trunc 63 | trimSuffix "-" -}}
|
||
|
{{- end -}}
|
||
|
{{- end -}}
|
||
|
{{- end -}}
|
||
|
|
||
|
{{/*
|
||
|
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 "ceph-csi-rbd.nodeplugin.fullname" -}}
|
||
|
{{- if .Values.nodeplugin.fullnameOverride -}}
|
||
|
{{- .Values.nodeplugin.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||
|
{{- else -}}
|
||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||
|
{{- if contains $name .Release.Name -}}
|
||
|
{{- printf "%s-%s" .Release.Name .Values.nodeplugin.name | trunc 63 | trimSuffix "-" -}}
|
||
|
{{- else -}}
|
||
|
{{- printf "%s-%s-%s" .Release.Name $name .Values.nodeplugin.name | trunc 63 | trimSuffix "-" -}}
|
||
|
{{- end -}}
|
||
|
{{- end -}}
|
||
|
{{- end -}}
|
||
|
|
||
|
{{/*
|
||
|
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 "ceph-csi-rbd.provisioner.fullname" -}}
|
||
|
{{- if .Values.provisioner.fullnameOverride -}}
|
||
|
{{- .Values.provisioner.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||
|
{{- else -}}
|
||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||
|
{{- if contains $name .Release.Name -}}
|
||
|
{{- printf "%s-%s" .Release.Name .Values.provisioner.name | trunc 63 | trimSuffix "-" -}}
|
||
|
{{- else -}}
|
||
|
{{- printf "%s-%s-%s" .Release.Name $name .Values.provisioner.name | trunc 63 | trimSuffix "-" -}}
|
||
|
{{- end -}}
|
||
|
{{- end -}}
|
||
|
{{- end -}}
|
||
|
|
||
|
{{/*
|
||
|
Create chart name and version as used by the chart label.
|
||
|
*/}}
|
||
|
{{- define "ceph-csi-rbd.chart" -}}
|
||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||
|
{{- end -}}
|
||
|
|
||
|
{{/*
|
||
|
Create the name of the service account to use
|
||
|
*/}}
|
||
|
{{- define "ceph-csi-rbd.serviceAccountName.attacher" -}}
|
||
|
{{- if .Values.serviceAccounts.attacher.create -}}
|
||
|
{{ default (include "ceph-csi-rbd.attacher.fullname" .) .Values.serviceAccounts.attacher.name }}
|
||
|
{{- else -}}
|
||
|
{{ default "default" .Values.serviceAccounts.attacher.name }}
|
||
|
{{- end -}}
|
||
|
{{- end -}}
|
||
|
|
||
|
{{/*
|
||
|
Create the name of the service account to use
|
||
|
*/}}
|
||
|
{{- define "ceph-csi-rbd.serviceAccountName.nodeplugin" -}}
|
||
|
{{- if .Values.serviceAccounts.nodeplugin.create -}}
|
||
|
{{ default (include "ceph-csi-rbd.nodeplugin.fullname" .) .Values.serviceAccounts.nodeplugin.name }}
|
||
|
{{- else -}}
|
||
|
{{ default "default" .Values.serviceAccounts.nodeplugin.name }}
|
||
|
{{- end -}}
|
||
|
{{- end -}}
|
||
|
|
||
|
{{/*
|
||
|
Create the name of the service account to use
|
||
|
*/}}
|
||
|
{{- define "ceph-csi-rbd.serviceAccountName.provisioner" -}}
|
||
|
{{- if .Values.serviceAccounts.provisioner.create -}}
|
||
|
{{ default (include "ceph-csi-rbd.provisioner.fullname" .) .Values.serviceAccounts.provisioner.name }}
|
||
|
{{- else -}}
|
||
|
{{ default "default" .Values.serviceAccounts.provisioner.name }}
|
||
|
{{- end -}}
|
||
|
{{- end -}}
|