mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
feat: Bump common library to v3.4.0 (#349)
This commit is contained in:
parent
a78c21ab00
commit
86062681a9
45 changed files with 1023 additions and 149 deletions
|
@ -4,19 +4,17 @@ Args used by the container.
|
|||
{{- define "bjw-s.common.lib.container.field.args" -}}
|
||||
{{- $ctx := .ctx -}}
|
||||
{{- $containerObject := $ctx.containerObject -}}
|
||||
{{- $argValues := get $containerObject "args" -}}
|
||||
|
||||
{{- /* Default to empty list */ -}}
|
||||
{{- $args := list -}}
|
||||
|
||||
{{- /* See if an override is desired */ -}}
|
||||
{{- if not (empty (get $containerObject "args")) -}}
|
||||
{{- $option := get $containerObject "args" -}}
|
||||
{{- if not (empty $option) -}}
|
||||
{{- if kindIs "string" $option -}}
|
||||
{{- $args = append $args $option -}}
|
||||
{{- else -}}
|
||||
{{- $args = $option -}}
|
||||
{{- end -}}
|
||||
{{- if not (empty $argValues) -}}
|
||||
{{- if kindIs "string" $argValues -}}
|
||||
{{- $args = append $args $argValues -}}
|
||||
{{- else -}}
|
||||
{{- $args = $argValues -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
|
|
@ -4,19 +4,17 @@ Command used by the container.
|
|||
{{- define "bjw-s.common.lib.container.field.command" -}}
|
||||
{{- $ctx := .ctx -}}
|
||||
{{- $containerObject := $ctx.containerObject -}}
|
||||
{{- $commandValues := get $containerObject "command" -}}
|
||||
|
||||
{{- /* Default to empty list */ -}}
|
||||
{{- $command := list -}}
|
||||
|
||||
{{- /* See if an override is desired */ -}}
|
||||
{{- if not (empty (get $containerObject "command")) -}}
|
||||
{{- $option := get $containerObject "command" -}}
|
||||
{{- if not (empty $option) -}}
|
||||
{{- if kindIs "string" $option -}}
|
||||
{{- $command = append $command $option -}}
|
||||
{{- else -}}
|
||||
{{- $command = $option -}}
|
||||
{{- end -}}
|
||||
{{- if not (empty $commandValues) -}}
|
||||
{{- if kindIs "string" $commandValues -}}
|
||||
{{- $command = append $command $commandValues -}}
|
||||
{{- else -}}
|
||||
{{- $command = $commandValues -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
|
|
@ -5,25 +5,26 @@ Env field used by the container.
|
|||
{{- $ctx := .ctx -}}
|
||||
{{- $rootContext := $ctx.rootContext -}}
|
||||
{{- $containerObject := $ctx.containerObject -}}
|
||||
{{- $envValues := get $containerObject "env" -}}
|
||||
|
||||
{{- /* Default to empty list */ -}}
|
||||
{{- $envList := list -}}
|
||||
|
||||
{{- /* See if an override is desired */ -}}
|
||||
{{- if not (empty (get $containerObject "env")) -}}
|
||||
{{- if kindIs "slice" $containerObject.env -}}
|
||||
{{- if not (empty $envValues) -}}
|
||||
{{- if kindIs "slice" $envValues -}}
|
||||
{{- /* Env is a list so we assume the order is already as desired */ -}}
|
||||
{{- range $name, $var := $containerObject.env -}}
|
||||
{{- range $name, $var := $envValues -}}
|
||||
{{- if kindIs "int" $name -}}
|
||||
{{- $name = required "environment variables as a list of maps require a name field" $var.name -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $envList = $containerObject.env -}}
|
||||
{{- $envList = $envValues -}}
|
||||
{{- else -}}
|
||||
{{- /* Env is a map so we must check if ordering is desired */ -}}
|
||||
{{- $graph := dict -}}
|
||||
|
||||
{{- range $name, $var := $containerObject.env -}}
|
||||
{{- range $name, $var := $envValues -}}
|
||||
{{- if kindIs "map" $var -}}
|
||||
{{- /* Value is a map so ordering can be specified */ -}}
|
||||
{{- if empty (dig "dependsOn" nil $var) -}}
|
||||
|
@ -44,7 +45,7 @@ Env field used by the container.
|
|||
|
||||
{{- range $name := $args.out -}}
|
||||
{{- $envItem := dict "name" $name -}}
|
||||
{{- $envValue := get $containerObject.env $name -}}
|
||||
{{- $envValue := get $envValues $name -}}
|
||||
|
||||
{{- if kindIs "map" $envValue -}}
|
||||
{{- $envItem := merge $envItem (omit $envValue "dependsOn") -}}
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
{{/*
|
||||
Env field used by the container.
|
||||
envFrom field used by the container.
|
||||
*/}}
|
||||
{{- define "bjw-s.common.lib.container.field.envFrom" -}}
|
||||
{{- $ctx := .ctx -}}
|
||||
{{- $rootContext := $ctx.rootContext -}}
|
||||
{{- $containerObject := $ctx.containerObject -}}
|
||||
{{- $envFromValues := get $containerObject "envFrom" -}}
|
||||
|
||||
{{- if not (empty (get $containerObject "envFrom")) -}}
|
||||
{{- if not (empty $envFromValues) -}}
|
||||
{{- $envFrom := list -}}
|
||||
{{- range $containerObject.envFrom -}}
|
||||
{{- range $envFromValues -}}
|
||||
{{- $item := dict -}}
|
||||
|
||||
{{- if hasKey . "configMap" -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue