mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-03 16:37:04 +02:00
feat(common): Release 2.0.1 (#193)
This commit is contained in:
parent
bf5b623fa6
commit
66389dec8b
13 changed files with 240 additions and 148 deletions
|
@ -3,9 +3,18 @@ Validate container values
|
|||
*/}}
|
||||
{{- define "bjw-s.common.lib.container.validate" -}}
|
||||
{{- $rootContext := .rootContext -}}
|
||||
{{- $containerValues := .object -}}
|
||||
{{- $controllerObject := .controllerObject -}}
|
||||
{{- $containerObject := .containerObject -}}
|
||||
|
||||
{{- if eq (dig "image" "repository" "" $containerValues) "" -}}
|
||||
{{- fail (printf "No image repository specified for container. (controller: %s, container: %s)" $containerValues.controller $containerValues.identifier) }}
|
||||
{{- if not (kindIs "map" $containerObject.image) -}}
|
||||
{{- fail (printf "Image required to be a dictionary with repository and tag fields. (controller %s, container %s)" $controllerObject.identifier $containerObject.identifier) }}
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq (dig "image" "repository" "" $containerObject) "" -}}
|
||||
{{- fail (printf "No image repository specified for container. (controller %s, container %s)" $controllerObject.identifier $containerObject.identifier) }}
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq (dig "image" "tag" "" $containerObject) "" -}}
|
||||
{{- fail (printf "No image tag specified for container. (controller %s, container %s)" $controllerObject.identifier $containerObject.identifier) }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue