rename all custom scripts to common.custom.*

This commit is contained in:
kjeld Schouten-Lebbing 2021-02-09 18:21:12 +01:00
parent 492730454e
commit be639def81
No known key found for this signature in database
GPG Key ID: 4CDAD4A532BC1EDB
11 changed files with 21 additions and 21 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
name: common
description: Function library for TrueCharts
type: library
version: 0.11.2
version: 0.11.3
# upstream_version: 2.4.0
keywords:
- truecharts

View File

@ -31,9 +31,9 @@ Main entrypoint for the common library chart. It will render all underlying temp
{{- end -}}
{{- print "---" | nindent 0 -}}
{{ include "common.service" . | nindent 0 }}
{{ include "custom.appService" . | nindent 0 }}
{{ include "common.custom.appService" . | nindent 0 }}
{{- print "---" | nindent 0 -}}
{{ include "common.ingress" . | nindent 0 }}
{{- print "---" | nindent 0 -}}
{{ include "custom.appIngress" . | nindent 0 }}
{{ include "common.custom.appIngress" . | nindent 0 }}
{{- end -}}

View File

@ -1,7 +1,7 @@
{{/*
Renders the additioanl Service objects from appAdditionalServices
*/}}
{{- define "custom.appService" -}}
{{- define "common.custom.appService" -}}
{{- /* Generate TrueNAS SCALE app services as required v1 */ -}}
{{- if and .Values.appAdditionalServicesEnabled .Values.appAdditionalServices -}}
{{- range $name, $srv := .Values.appAdditionalServices }}

View File

@ -1,7 +1,7 @@
{{/*
Retrieve host path from ix volumes based on dataset name
*/}}
{{- define "retrieveHostPathFromiXVolume" -}}
{{- define "common.custom.retrieveHostPathFromiXVolume" -}}
{{- range $index, $hostPathConfiguration := $.ixVolumes }}
{{- $dsName := base $hostPathConfiguration.hostPath -}}
{{- if eq $.datasetName $dsName -}}
@ -13,7 +13,7 @@ Retrieve host path from ix volumes based on dataset name
{{/*
Define appVolumeMounts for container
*/}}
{{- define "configuredAppVolumeMounts" -}}
{{- define "common.custom.configuredAppVolumeMounts" -}}
{{- if and .Values.appVolumesEnabled .Values.appVolumeMounts }}
{{- range $name, $avm := .Values.appVolumeMounts -}}
{{- if $avm.enabled }}
@ -30,7 +30,7 @@ Define appVolumeMounts for container
{{/*
Define hostPath for appVolumes
*/}}
{{- define "configuredAppVolumes" -}}
{{- define "common.custom.configuredAppVolumes" -}}
{{- if and .Values.appVolumesEnabled .Values.appVolumeMounts }}
{{- range $name, $av := .Values.appVolumeMounts -}}
{{- if $av.enabled }}
@ -43,7 +43,7 @@ Define hostPath for appVolumes
path: {{ required "hostPath not set" $av.hostPath }}
{{- else }}
{{- $volDict := dict "datasetName" $av.datasetName "ixVolumes" $.Values.ixVolumes -}}
path: {{ include "retrieveHostPathFromiXVolume" $volDict }}
path: {{ include "common.custom.retrieveHostPathFromiXVolume" $volDict }}
{{- end }}
{{- end }}
{{- end }}

View File

@ -1,7 +1,7 @@
{{/*
Renders the additional ingress objects from appIngress
*/}}
{{- define "custom.appIngress" -}}
{{- define "common.custom.appIngress" -}}
{{- /* Generate TrueNAS SCALE app services as required v1 */ -}}
{{- if .Values.appIngress -}}
{{- range $name, $ingr := .Values.appIngress }}
@ -14,19 +14,19 @@ Renders the additional ingress objects from appIngress
{{- $_ := set $ "ObjectValues" (dict "appIngress" $ingressValues) -}}
{{- if $ingressValues.type -}}
{{- if eq $ingressValues.type "UDP" -}}
{{- include "custom.classes.appIngressUDP" $ }}
{{- include "common.custom.classes.appIngressUDP" $ }}
{{- else if eq $ingressValues.type "TCP" -}}
{{- include "custom.classes.appIngressTCP" $ }}
{{- include "common.custom.classes.appIngressTCP" $ }}
{{- else }}
{{- include "custom.classes.appIngressHTTP" $ }}
{{- include "common.custom.classes.appIngressHTTP" $ }}
{{- if $ingressValues.authForwardURL }}
{{- include "custom.classes.appAuthForward" $ }}
{{- include "common.custom.classes.appAuthForward" $ }}
{{- end }}
{{- end }}
{{- else }}
{{- include "custom.classes.appIngressHTTP" $ }}
{{- include "common.custom.classes.appIngressHTTP" $ }}
{{- if $ingressValues.authForwardURL }}
{{- include "custom.classes.appAuthForward" $ }}
{{- include "common.custom.classes.appAuthForward" $ }}
{{- end }}
{{- end }}
{{- end }}

View File

@ -1,7 +1,7 @@
{{/*
Renders the additioanl authForward objects from appAuthForward
*/}}
{{- define "custom.classes.appAuthForward" -}}
{{- define "common.custom.classes.appAuthForward" -}}
{{- /* Generate TrueNAS SCALE app services as required v1 */ -}}
{{- $values := .Values.appIngress -}}
{{- if hasKey . "ObjectValues" -}}

View File

@ -2,7 +2,7 @@
This template serves as a blueprint for all appIngress objects that are created
within the common library.
*/}}
{{- define "custom.classes.appIngressHTTP" -}}
{{- define "common.custom.classes.appIngressHTTP" -}}
{{- $values := .Values.appIngress -}}
{{- if hasKey . "ObjectValues" -}}
{{- with .ObjectValues.appIngress -}}

View File

@ -2,7 +2,7 @@
This template serves as a blueprint for all appIngressTCP objects that are created
within the common library.
*/}}
{{- define "custom.classes.appIngressTCP" -}}
{{- define "common.custom.classes.appIngressTCP" -}}
{{- $values := .Values.appIngress -}}
{{- if hasKey . "ObjectValues" -}}
{{- with .ObjectValues.appIngress -}}

View File

@ -2,7 +2,7 @@
This template serves as a blueprint for all appIngressTCP objects that are created
within the common library.
*/}}
{{- define "custom.classes.appIngressUDP" -}}
{{- define "common.custom.classes.appIngressUDP" -}}
{{- $values := .Values.appIngress -}}
{{- if hasKey . "ObjectValues" -}}
{{- with .ObjectValues.appIngress -}}

View File

@ -54,7 +54,7 @@ The main container included in the controller.
{{- end }}
{{- end }}
{{- end }}
{{- include "configuredAppVolumeMounts" . | indent 2 }}
{{- include "common.custom.configuredAppVolumeMounts" . | indent 2 }}
{{- if .Values.additionalVolumeMounts }}
{{- toYaml .Values.additionalVolumeMounts | nindent 2 }}
{{- end }}

View File

@ -25,7 +25,7 @@ Volumes included by the controller.
{{- end }}
{{- end }}
{{- end }}
{{- include "configuredAppVolumes" . }}
{{- include "common.custom.configuredAppVolumes" . }}
{{- if .Values.additionalVolumes }}
{{- toYaml .Values.additionalVolumes | nindent 0 }}
{{- end }}