mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
fix(common): Release common-4.0.1 (#415)
This commit is contained in:
parent
a01a89cb13
commit
9a478444a4
14 changed files with 163 additions and 15 deletions
|
@ -5,6 +5,21 @@ Validate Route values
|
|||
{{- $rootContext := .rootContext -}}
|
||||
{{- $routeObject := .object -}}
|
||||
|
||||
{{- $enabledServices := (include "bjw-s.common.lib.service.enabledServices" (dict "rootContext" $rootContext) | fromYaml ) -}}
|
||||
|
||||
{{/* Verify automatic Service detection */}}
|
||||
{{- if not (eq 1 (len $enabledServices)) -}}
|
||||
{{- range $routeObject.rules -}}
|
||||
{{- $rule := . -}}
|
||||
{{- range $rule.backendRefs }}
|
||||
{{- $backendRef := . -}}
|
||||
{{- if and (empty (dig "name" nil $backendRef)) (empty (dig "identifier" nil $backendRef)) -}}
|
||||
{{- fail (printf "Either name or identifier is required because automatic Service detection is not possible. (route: %s)" $routeObject.identifier) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Route Types */}}
|
||||
{{- $routeKind := $routeObject.kind | default "HTTPRoute"}}
|
||||
{{- if and (ne $routeKind "GRPCRoute") (ne $routeKind "HTTPRoute") (ne $routeKind "TCPRoute") (ne $routeKind "TLSRoute") (ne $routeKind "UDPRoute") }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue