From 8e875e16642a6d0560a6e36f14927cb16fd15baf Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Fri, 29 Jan 2021 23:42:10 +0500 Subject: [PATCH] Remove unnecessary code in ipfs chart --- test/ipfs/1.0.1/templates/_helpers.tpl | 67 -------------------------- test/ipfs/1.0.1/templates/_storage.tpl | 35 -------------- 2 files changed, 102 deletions(-) delete mode 100644 test/ipfs/1.0.1/templates/_helpers.tpl delete mode 100644 test/ipfs/1.0.1/templates/_storage.tpl diff --git a/test/ipfs/1.0.1/templates/_helpers.tpl b/test/ipfs/1.0.1/templates/_helpers.tpl deleted file mode 100644 index 3324203697..0000000000 --- a/test/ipfs/1.0.1/templates/_helpers.tpl +++ /dev/null @@ -1,67 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "ipfs.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 "ipfs.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 chart name and version as used by the chart label. -*/}} -{{- define "ipfs.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for deployment. -*/}} -{{- define "ipfs.deployment.apiVersion" -}} -{{- print "apps/v1" -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for statefulset. -*/}} -{{- define "ipfs.statefulset.apiVersion" -}} -{{- print "apps/v1" -}} -{{- end -}} - -{{/* -Determine secret name. -*/}} -{{- define "ipfs.secretName" -}} -{{- include "ipfs.fullname" . -}} -{{- end -}} - -{{/* -Determine service account name for deployment or statefulset. -*/}} -{{- define "ipfs.serviceAccountName" -}} -{{- (include "ipfs.fullname" .) | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Determine name for scc role and rolebinding -*/}} -{{- define "ipfs.sccRoleName" -}} -{{- printf "%s-%s" "scc" (include "ipfs.fullname" .) | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/test/ipfs/1.0.1/templates/_storage.tpl b/test/ipfs/1.0.1/templates/_storage.tpl deleted file mode 100644 index 994f15f661..0000000000 --- a/test/ipfs/1.0.1/templates/_storage.tpl +++ /dev/null @@ -1,35 +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 ipfs -*/}} -{{- define "configuredHostPathData" -}} -{{- if .Values.ipfsDataHostPathEnabled -}} -{{- .Values.ipfsDataHostPath -}} -{{- else -}} -{{- $volDict := dict "datasetName" $.Values.ipfsDataVolume.datasetName "ixVolumes" $.Values.ixVolumes -}} -{{- include "retrieveHostPathFromiXVolume" $volDict -}} -{{- end -}} -{{- end -}} - -{{/* -Retrieve host path for ipfs -*/}} -{{- define "configuredHostPathStaging" -}} -{{- if .Values.ipfsStagingHostPathEnabled -}} -{{- .Values.ipfsStagingHostPath -}} -{{- else -}} -{{- $volDict := dict "datasetName" $.Values.ipfsStagingVolume.datasetName "ixVolumes" $.Values.ixVolumes -}} -{{- include "retrieveHostPathFromiXVolume" $volDict -}} -{{- end -}} -{{- end -}}