rename all custom scripts to common.custom.*
This commit is contained in:
@@ -2,7 +2,7 @@ apiVersion: v2
|
|||||||
name: common
|
name: common
|
||||||
description: Function library for TrueCharts
|
description: Function library for TrueCharts
|
||||||
type: library
|
type: library
|
||||||
version: 0.11.2
|
version: 0.11.3
|
||||||
# upstream_version: 2.4.0
|
# upstream_version: 2.4.0
|
||||||
keywords:
|
keywords:
|
||||||
- truecharts
|
- truecharts
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ Main entrypoint for the common library chart. It will render all underlying temp
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- print "---" | nindent 0 -}}
|
{{- print "---" | nindent 0 -}}
|
||||||
{{ include "common.service" . | nindent 0 }}
|
{{ include "common.service" . | nindent 0 }}
|
||||||
{{ include "custom.appService" . | nindent 0 }}
|
{{ include "common.custom.appService" . | nindent 0 }}
|
||||||
{{- print "---" | nindent 0 -}}
|
{{- print "---" | nindent 0 -}}
|
||||||
{{ include "common.ingress" . | nindent 0 }}
|
{{ include "common.ingress" . | nindent 0 }}
|
||||||
{{- print "---" | nindent 0 -}}
|
{{- print "---" | nindent 0 -}}
|
||||||
{{ include "custom.appIngress" . | nindent 0 }}
|
{{ include "common.custom.appIngress" . | nindent 0 }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{{/*
|
{{/*
|
||||||
Renders the additioanl Service objects from appAdditionalServices
|
Renders the additioanl Service objects from appAdditionalServices
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "custom.appService" -}}
|
{{- define "common.custom.appService" -}}
|
||||||
{{- /* Generate TrueNAS SCALE app services as required v1 */ -}}
|
{{- /* Generate TrueNAS SCALE app services as required v1 */ -}}
|
||||||
{{- if and .Values.appAdditionalServicesEnabled .Values.appAdditionalServices -}}
|
{{- if and .Values.appAdditionalServicesEnabled .Values.appAdditionalServices -}}
|
||||||
{{- range $name, $srv := .Values.appAdditionalServices }}
|
{{- range $name, $srv := .Values.appAdditionalServices }}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{{/*
|
{{/*
|
||||||
Retrieve host path from ix volumes based on dataset name
|
Retrieve host path from ix volumes based on dataset name
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "retrieveHostPathFromiXVolume" -}}
|
{{- define "common.custom.retrieveHostPathFromiXVolume" -}}
|
||||||
{{- range $index, $hostPathConfiguration := $.ixVolumes }}
|
{{- range $index, $hostPathConfiguration := $.ixVolumes }}
|
||||||
{{- $dsName := base $hostPathConfiguration.hostPath -}}
|
{{- $dsName := base $hostPathConfiguration.hostPath -}}
|
||||||
{{- if eq $.datasetName $dsName -}}
|
{{- if eq $.datasetName $dsName -}}
|
||||||
@@ -13,7 +13,7 @@ Retrieve host path from ix volumes based on dataset name
|
|||||||
{{/*
|
{{/*
|
||||||
Define appVolumeMounts for container
|
Define appVolumeMounts for container
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "configuredAppVolumeMounts" -}}
|
{{- define "common.custom.configuredAppVolumeMounts" -}}
|
||||||
{{- if and .Values.appVolumesEnabled .Values.appVolumeMounts }}
|
{{- if and .Values.appVolumesEnabled .Values.appVolumeMounts }}
|
||||||
{{- range $name, $avm := .Values.appVolumeMounts -}}
|
{{- range $name, $avm := .Values.appVolumeMounts -}}
|
||||||
{{- if $avm.enabled }}
|
{{- if $avm.enabled }}
|
||||||
@@ -30,7 +30,7 @@ Define appVolumeMounts for container
|
|||||||
{{/*
|
{{/*
|
||||||
Define hostPath for appVolumes
|
Define hostPath for appVolumes
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "configuredAppVolumes" -}}
|
{{- define "common.custom.configuredAppVolumes" -}}
|
||||||
{{- if and .Values.appVolumesEnabled .Values.appVolumeMounts }}
|
{{- if and .Values.appVolumesEnabled .Values.appVolumeMounts }}
|
||||||
{{- range $name, $av := .Values.appVolumeMounts -}}
|
{{- range $name, $av := .Values.appVolumeMounts -}}
|
||||||
{{- if $av.enabled }}
|
{{- if $av.enabled }}
|
||||||
@@ -43,7 +43,7 @@ Define hostPath for appVolumes
|
|||||||
path: {{ required "hostPath not set" $av.hostPath }}
|
path: {{ required "hostPath not set" $av.hostPath }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- $volDict := dict "datasetName" $av.datasetName "ixVolumes" $.Values.ixVolumes -}}
|
{{- $volDict := dict "datasetName" $av.datasetName "ixVolumes" $.Values.ixVolumes -}}
|
||||||
path: {{ include "retrieveHostPathFromiXVolume" $volDict }}
|
path: {{ include "common.custom.retrieveHostPathFromiXVolume" $volDict }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{{/*
|
{{/*
|
||||||
Renders the additional ingress objects from appIngress
|
Renders the additional ingress objects from appIngress
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "custom.appIngress" -}}
|
{{- define "common.custom.appIngress" -}}
|
||||||
{{- /* Generate TrueNAS SCALE app services as required v1 */ -}}
|
{{- /* Generate TrueNAS SCALE app services as required v1 */ -}}
|
||||||
{{- if .Values.appIngress -}}
|
{{- if .Values.appIngress -}}
|
||||||
{{- range $name, $ingr := .Values.appIngress }}
|
{{- range $name, $ingr := .Values.appIngress }}
|
||||||
@@ -14,19 +14,19 @@ Renders the additional ingress objects from appIngress
|
|||||||
{{- $_ := set $ "ObjectValues" (dict "appIngress" $ingressValues) -}}
|
{{- $_ := set $ "ObjectValues" (dict "appIngress" $ingressValues) -}}
|
||||||
{{- if $ingressValues.type -}}
|
{{- if $ingressValues.type -}}
|
||||||
{{- if eq $ingressValues.type "UDP" -}}
|
{{- if eq $ingressValues.type "UDP" -}}
|
||||||
{{- include "custom.classes.appIngressUDP" $ }}
|
{{- include "common.custom.classes.appIngressUDP" $ }}
|
||||||
{{- else if eq $ingressValues.type "TCP" -}}
|
{{- else if eq $ingressValues.type "TCP" -}}
|
||||||
{{- include "custom.classes.appIngressTCP" $ }}
|
{{- include "common.custom.classes.appIngressTCP" $ }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- include "custom.classes.appIngressHTTP" $ }}
|
{{- include "common.custom.classes.appIngressHTTP" $ }}
|
||||||
{{- if $ingressValues.authForwardURL }}
|
{{- if $ingressValues.authForwardURL }}
|
||||||
{{- include "custom.classes.appAuthForward" $ }}
|
{{- include "common.custom.classes.appAuthForward" $ }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- include "custom.classes.appIngressHTTP" $ }}
|
{{- include "common.custom.classes.appIngressHTTP" $ }}
|
||||||
{{- if $ingressValues.authForwardURL }}
|
{{- if $ingressValues.authForwardURL }}
|
||||||
{{- include "custom.classes.appAuthForward" $ }}
|
{{- include "common.custom.classes.appAuthForward" $ }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{{/*
|
{{/*
|
||||||
Renders the additioanl authForward objects from appAuthForward
|
Renders the additioanl authForward objects from appAuthForward
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "custom.classes.appAuthForward" -}}
|
{{- define "common.custom.classes.appAuthForward" -}}
|
||||||
{{- /* Generate TrueNAS SCALE app services as required v1 */ -}}
|
{{- /* Generate TrueNAS SCALE app services as required v1 */ -}}
|
||||||
{{- $values := .Values.appIngress -}}
|
{{- $values := .Values.appIngress -}}
|
||||||
{{- if hasKey . "ObjectValues" -}}
|
{{- if hasKey . "ObjectValues" -}}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
This template serves as a blueprint for all appIngress objects that are created
|
This template serves as a blueprint for all appIngress objects that are created
|
||||||
within the common library.
|
within the common library.
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "custom.classes.appIngressHTTP" -}}
|
{{- define "common.custom.classes.appIngressHTTP" -}}
|
||||||
{{- $values := .Values.appIngress -}}
|
{{- $values := .Values.appIngress -}}
|
||||||
{{- if hasKey . "ObjectValues" -}}
|
{{- if hasKey . "ObjectValues" -}}
|
||||||
{{- with .ObjectValues.appIngress -}}
|
{{- with .ObjectValues.appIngress -}}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
This template serves as a blueprint for all appIngressTCP objects that are created
|
This template serves as a blueprint for all appIngressTCP objects that are created
|
||||||
within the common library.
|
within the common library.
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "custom.classes.appIngressTCP" -}}
|
{{- define "common.custom.classes.appIngressTCP" -}}
|
||||||
{{- $values := .Values.appIngress -}}
|
{{- $values := .Values.appIngress -}}
|
||||||
{{- if hasKey . "ObjectValues" -}}
|
{{- if hasKey . "ObjectValues" -}}
|
||||||
{{- with .ObjectValues.appIngress -}}
|
{{- with .ObjectValues.appIngress -}}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
This template serves as a blueprint for all appIngressTCP objects that are created
|
This template serves as a blueprint for all appIngressTCP objects that are created
|
||||||
within the common library.
|
within the common library.
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "custom.classes.appIngressUDP" -}}
|
{{- define "common.custom.classes.appIngressUDP" -}}
|
||||||
{{- $values := .Values.appIngress -}}
|
{{- $values := .Values.appIngress -}}
|
||||||
{{- if hasKey . "ObjectValues" -}}
|
{{- if hasKey . "ObjectValues" -}}
|
||||||
{{- with .ObjectValues.appIngress -}}
|
{{- with .ObjectValues.appIngress -}}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ The main container included in the controller.
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- include "configuredAppVolumeMounts" . | indent 2 }}
|
{{- include "common.custom.configuredAppVolumeMounts" . | indent 2 }}
|
||||||
{{- if .Values.additionalVolumeMounts }}
|
{{- if .Values.additionalVolumeMounts }}
|
||||||
{{- toYaml .Values.additionalVolumeMounts | nindent 2 }}
|
{{- toYaml .Values.additionalVolumeMounts | nindent 2 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ Volumes included by the controller.
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- include "configuredAppVolumes" . }}
|
{{- include "common.custom.configuredAppVolumes" . }}
|
||||||
{{- if .Values.additionalVolumes }}
|
{{- if .Values.additionalVolumes }}
|
||||||
{{- toYaml .Values.additionalVolumes | nindent 0 }}
|
{{- toYaml .Values.additionalVolumes | nindent 0 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
Reference in New Issue
Block a user