mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
feat(common): Release library 3.7.0 (#377)
Signed-off-by: solidDoWant <fred.heinecke@yahoo.com> Co-authored-by: Patrick Collins <Patricol@users.noreply.github.com> Co-authored-by: Patrick Collins <patrick.collins@gainbridge.io> Co-authored-by: Lawrence Gil <larrywtf609@gmail.com> Co-authored-by: solidDoWant <fred.heinecke@yahoo.com>
This commit is contained in:
parent
aee0d999ba
commit
8b33237e27
32 changed files with 793 additions and 655 deletions
|
@ -4,8 +4,28 @@ Validate configMap values
|
|||
{{- define "bjw-s.common.lib.configMap.validate" -}}
|
||||
{{- $rootContext := .rootContext -}}
|
||||
{{- $configMapValues := .object -}}
|
||||
{{- $identifier := .id -}}
|
||||
|
||||
{{- if empty $configMapValues -}}
|
||||
{{- fail (printf "There was an error loading ConfigMap: %s. If it was automatically generated from a folder verify that files are properly flagged as `binary` or `escaped`" $identifier) -}}
|
||||
{{- end -}}
|
||||
{{- if and (empty (get $configMapValues "data")) (empty (get $configMapValues "binaryData")) -}}
|
||||
{{- fail (printf "No data or binaryData specified for configMap. (configMap: %s)" $configMapValues.identifier) }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Validate configMap from folder values
|
||||
*/}}
|
||||
{{- define "bjw-s.common.lib.configMap.fromFolder.validate" -}}
|
||||
{{- $rootContext := .rootContext -}}
|
||||
{{- $basePath := required "If you're using `configMapsFromFolder` you need to specify a `basePath` key" .basePath -}}
|
||||
{{ $topLevelFolders := dict}}
|
||||
{{- range $path, $_ := $rootContext.Files.Glob (printf "%s/*/*" $basePath) -}}
|
||||
{{- $_ := set $topLevelFolders (dir $path) "" -}}
|
||||
{{- end -}}
|
||||
{{- $topLevelFoldersList := keys $topLevelFolders | sortAlpha -}}
|
||||
{{- if empty $topLevelFoldersList -}}
|
||||
{{- fail (printf "No configMaps found in the folder %s" $basePath) }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -54,7 +54,13 @@ Probes used by the container.
|
|||
"scheme" $probeType
|
||||
)
|
||||
-}}
|
||||
{{- else }}
|
||||
{{- else if (eq $probeType "GRPC") -}}
|
||||
{{- $probeHeader = "grpc" -}}
|
||||
{{- $_ := set $probeDefinition $probeHeader dict -}}
|
||||
{{- if $probeValues.service -}}
|
||||
{{- $_ := set (index $probeDefinition $probeHeader) "service" $probeValues.service -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- $probeHeader = "tcpSocket" -}}
|
||||
{{- $_ := set $probeDefinition $probeHeader dict -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -31,6 +31,9 @@ hostPID: {{ include "bjw-s.common.lib.pod.getOption" (dict "ctx" $ctx "option" "
|
|||
{{- with (include "bjw-s.common.lib.pod.getOption" (dict "ctx" $ctx "option" "hostUsers")) }}
|
||||
hostUsers: {{ . | trim }}
|
||||
{{- end -}}
|
||||
{{- with (include "bjw-s.common.lib.pod.getOption" (dict "ctx" $ctx "option" "shareProcessNamespace")) }}
|
||||
shareProcessNamespace: {{ . | trim }}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
dnsPolicy: {{ include "bjw-s.common.lib.pod.field.dnsPolicy" (dict "ctx" $ctx) | trim }}
|
||||
{{- with (include "bjw-s.common.lib.pod.getOption" (dict "ctx" $ctx "option" "dnsConfig")) }}
|
||||
|
@ -52,7 +55,7 @@ restartPolicy: {{ . | trim }}
|
|||
nodeSelector: {{ . | nindent 2 }}
|
||||
{{- end -}}
|
||||
{{- with (include "bjw-s.common.lib.pod.getOption" (dict "ctx" $ctx "option" "affinity")) }}
|
||||
affinity: {{ . | nindent 2 }}
|
||||
affinity: {{- tpl . $rootContext | nindent 2 }}
|
||||
{{- end -}}
|
||||
{{- with (include "bjw-s.common.lib.pod.getOption" (dict "ctx" $ctx "option" "topologySpreadConstraints")) }}
|
||||
topologySpreadConstraints: {{ . | nindent 2 }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue