mirror of
https://github.com/truecharts/library-charts.git
synced 2026-07-03 06:49:17 -03:00
chore(enabled): make sure the key always exist
This commit is contained in:
@@ -15,7 +15,7 @@ maintainers:
|
||||
name: common
|
||||
sources: null
|
||||
type: library
|
||||
version: 19.1.1
|
||||
version: 19.1.2
|
||||
annotations:
|
||||
artifacthub.io/category: "integration-delivery"
|
||||
artifacthub.io/license: "BUSL-1.1"
|
||||
|
||||
@@ -6,12 +6,14 @@
|
||||
{{- $caller := .caller -}}
|
||||
|
||||
{{- $enabled := false -}}
|
||||
{{- if hasKey $objectData "enabled" -}}
|
||||
{{- if not (kindIs "invalid" $objectData.enabled) -}}
|
||||
{{- $enabled = $objectData.enabled -}}
|
||||
{{- else -}}
|
||||
{{- fail (printf "%s - Expected the defined key [enabled] in [%s.%s] to not be empty" $caller $key $name) -}}
|
||||
{{- end -}}
|
||||
{{- if not (hasKey $objectData "enabled") -}}
|
||||
{{- fail (printf "%s - Expected the key [enabled] in [%s.%s] to exist" $caller $key $name) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if not (kindIs "invalid" $objectData.enabled) -}}
|
||||
{{- $enabled = $objectData.enabled -}}
|
||||
{{- else -}}
|
||||
{{- fail (printf "%s - Expected the defined key [enabled] in [%s.%s] to not be empty" $caller $key $name) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if kindIs "string" $enabled -}}
|
||||
|
||||
Reference in New Issue
Block a user