mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 17:07:04 +02:00
feat(common): Release common v4.1.0 (#416)
This commit is contained in:
parent
f3660654f4
commit
db552e2dee
52 changed files with 705 additions and 129 deletions
|
@ -5,18 +5,8 @@ Return a service Object by its Identifier.
|
|||
{{- $rootContext := .rootContext -}}
|
||||
{{- $identifier := .id -}}
|
||||
{{- $enabledServices := (include "bjw-s.common.lib.service.enabledServices" (dict "rootContext" $rootContext) | fromYaml ) }}
|
||||
{{- $enabledControllers := (include "bjw-s.common.lib.controller.enabledControllers" (dict "rootContext" $rootContext) | fromYaml ) -}}
|
||||
|
||||
{{- if (hasKey $enabledServices $identifier) -}}
|
||||
{{- $objectValues := get $enabledServices $identifier -}}
|
||||
{{- $object := include "bjw-s.common.lib.valuesToObject" (dict "rootContext" $rootContext "id" $identifier "values" $objectValues "itemCount" (len $enabledServices)) | fromYaml -}}
|
||||
|
||||
{{- if eq 1 (len $enabledControllers) -}}
|
||||
{{- if (empty (dig "controller" nil $object)) -}}
|
||||
{{- $_ := set $object "controller" ($enabledControllers | keys | first) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $object | toYaml -}}
|
||||
{{- get $enabledServices $identifier | toYaml -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue