From 387dd828435f3b4dd77754af92ddca9037b1e8a9 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Sat, 30 Jan 2021 01:20:55 +0500 Subject: [PATCH] Remove storage tpl functions from plex chart --- test/plex/1.0.1/templates/_helpers.tpl | 29 --------------- test/plex/1.0.1/templates/_storage.tpl | 50 -------------------------- 2 files changed, 79 deletions(-) delete mode 100644 test/plex/1.0.1/templates/_storage.tpl diff --git a/test/plex/1.0.1/templates/_helpers.tpl b/test/plex/1.0.1/templates/_helpers.tpl index 18ddff7f7e..5e1791e48e 100644 --- a/test/plex/1.0.1/templates/_helpers.tpl +++ b/test/plex/1.0.1/templates/_helpers.tpl @@ -50,32 +50,3 @@ Selector labels app.kubernetes.io/name: {{ include "plex.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "plex.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "plex.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -abstract: | - Joins a list of values into a comma separated string -values: | - test: - - foo - - bar -usage: | - {{ include "joinListWithComma" .Values.test }} -return: | - foo,bar -*/}} - -{{- define "joinListWithComma" -}} -{{- $local := dict "first" true -}} -{{- range $k, $v := . -}}{{- if not $local.first -}},{{- end -}}{{- $v -}}{{- $_ := set $local "first" false -}}{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/test/plex/1.0.1/templates/_storage.tpl b/test/plex/1.0.1/templates/_storage.tpl deleted file mode 100644 index ef34fcb041..0000000000 --- a/test/plex/1.0.1/templates/_storage.tpl +++ /dev/null @@ -1,50 +0,0 @@ -{{/* -Retrieve host path from ix volumes based on dataset name -*/}} -{{- define "retrieveHostPathFromiXVolume" -}} -{{- range $index, $hostPathConfiguration := $.ixVolumes }} -{{- $dsName := base $hostPathConfiguration.hostPath -}} -{{- if eq $.datasetName $dsName -}} -{{- $hostPathConfiguration.hostPath -}} -{{- end -}} -{{- end }} -{{- end -}} - -{{/* -Retrieve host path for transcode -Let's please remove the redundancy -*/}} -{{- define "configuredHostPathTranscode" -}} -{{- if .Values.transcodeHostPathEnabled -}} -{{- .Values.transcodeHostPath -}} -{{- else -}} -{{- $volDict := dict "datasetName" $.Values.transcodeVolume.datasetName "ixVolumes" $.Values.ixVolumes -}} -{{- include "retrieveHostPathFromiXVolume" $volDict -}} -{{- end -}} -{{- end -}} - -{{/* -Retrieve host path for data -Let's please remove the redundancy -*/}} -{{- define "configuredHostPathData" -}} -{{- if .Values.dataHostPathEnabled -}} -{{- .Values.dataHostPath -}} -{{- else -}} -{{- $volDict := dict "datasetName" $.Values.dataVolume.datasetName "ixVolumes" $.Values.ixVolumes -}} -{{- include "retrieveHostPathFromiXVolume" $volDict -}} -{{- end -}} -{{- end -}} - -{{/* -Retrieve host path for transcode -Let's please remove the redundancy -*/}} -{{- define "configuredHostPathConfig" -}} -{{- if .Values.configHostPathEnabled -}} -{{- .Values.configHostPath -}} -{{- else -}} -{{- $volDict := dict "datasetName" $.Values.configVolume.datasetName "ixVolumes" $.Values.ixVolumes -}} -{{- include "retrieveHostPathFromiXVolume" $volDict -}} -{{- end -}} -{{- end -}}