mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(common): Release version 2.0.0-beta.1 (#173)
This commit is contained in:
parent
19767d668c
commit
7b6ee00be6
189 changed files with 3110 additions and 3023 deletions
|
@ -1,4 +1,4 @@
|
|||
{{/* Return the name of the primary ingress object */}}
|
||||
{{/* Return the name of the primary Ingress object */}}
|
||||
{{- define "bjw-s.common.lib.ingress.primary" -}}
|
||||
{{- $enabledIngresses := dict -}}
|
||||
{{- range $name, $ingress := .Values.ingress -}}
|
||||
|
|
15
charts/library/common/templates/lib/ingress/_validate.tpl
Normal file
15
charts/library/common/templates/lib/ingress/_validate.tpl
Normal file
|
@ -0,0 +1,15 @@
|
|||
{{/*
|
||||
Validate Ingress values
|
||||
*/}}
|
||||
{{- define "bjw-s.common.lib.ingress.validate" -}}
|
||||
{{- $rootContext := .rootContext -}}
|
||||
{{- $ingressValues := .object -}}
|
||||
|
||||
{{- range $ingressValues.hosts -}}
|
||||
{{- range .paths -}}
|
||||
{{- if or (eq (dig "service" "name" "" .) "") (not .service.name) -}}
|
||||
{{- fail (printf "No service name configured. (ingress: %s, path: %s)" $ingressValues.identifier .path) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
|
@ -0,0 +1,24 @@
|
|||
{{/*
|
||||
Convert ingress values to an object
|
||||
*/}}
|
||||
{{- define "bjw-s.common.lib.ingress.valuesToObject" -}}
|
||||
{{- $rootContext := .rootContext -}}
|
||||
{{- $identifier := .id -}}
|
||||
{{- $objectValues := .values -}}
|
||||
|
||||
{{- /* Determine and inject the ingress name */ -}}
|
||||
{{- $objectName := (include "bjw-s.common.lib.chart.names.fullname" $rootContext) -}}
|
||||
|
||||
{{- if $objectValues.nameOverride -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $objectValues.nameOverride -}}
|
||||
{{- else -}}
|
||||
{{- if ne $identifier "main" -}}
|
||||
{{- $objectName = printf "%s-%s" $objectName $identifier -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $_ := set $objectValues "name" $objectName -}}
|
||||
{{- $_ := set $objectValues "identifier" $identifier -}}
|
||||
|
||||
{{- /* Return the ingress object */ -}}
|
||||
{{- $objectValues | toYaml -}}
|
||||
{{- end -}}
|
Loading…
Add table
Add a link
Reference in a new issue