mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(common): Release common 4.0.0 (#398)
Co-authored-by: lab-assistant[bot] <180935599+lab-assistant[bot]@users.noreply.github.com>
This commit is contained in:
parent
1e210f43e3
commit
a01a89cb13
327 changed files with 11181 additions and 7330 deletions
|
@ -50,6 +50,9 @@ spec:
|
|||
{{- if .sectionName }}
|
||||
sectionName: {{ .sectionName | quote }}
|
||||
{{- end }}
|
||||
{{- if .port }}
|
||||
port: {{ .port }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and (ne $routeKind "TCPRoute") (ne $routeKind "UDPRoute") $routeObject.hostnames }}
|
||||
hostnames:
|
||||
|
@ -59,35 +62,47 @@ spec:
|
|||
{{- end }}
|
||||
rules:
|
||||
{{- range $routeObject.rules }}
|
||||
- backendRefs:
|
||||
{{- range .backendRefs }}
|
||||
{{ $service := include "bjw-s.common.lib.service.getByIdentifier" (dict "rootContext" $rootContext "id" .name) | fromYaml -}}
|
||||
{{ $servicePrimaryPort := dict -}}
|
||||
{{ if $service -}}
|
||||
{{ $servicePrimaryPort = include "bjw-s.common.lib.service.primaryPort" (dict "rootContext" $rootContext "serviceObject" $service) | fromYaml -}}
|
||||
{{- end }}
|
||||
- group: {{ .group | default "" | quote}}
|
||||
kind: {{ .kind | default "Service" }}
|
||||
name: {{ $service.name | default .name }}
|
||||
namespace: {{ .namespace | default $rootContext.Release.Namespace }}
|
||||
port: {{ .port | default $servicePrimaryPort.port }}
|
||||
weight: {{ include "bjw-s.common.lib.defaultKeepNonNullValue" (dict "value" .weight "default" 1) }}
|
||||
{{- end }}
|
||||
{{- if or (eq $routeKind "HTTPRoute") (eq $routeKind "GRPCRoute") }}
|
||||
{{- with .matches }}
|
||||
matches:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
- backendRefs:
|
||||
{{- if empty .backendRefs }}
|
||||
{{- printf " []" }}
|
||||
{{- else }}
|
||||
{{- range .backendRefs }}
|
||||
{{- $service := dict }}
|
||||
{{- $serviceName := "" }}
|
||||
{{- $defaultServicePort := dict }}
|
||||
{{- if .name }}
|
||||
{{- $serviceName = tpl .name $rootContext }}
|
||||
{{- else if .identifier }}
|
||||
{{- $service = (include "bjw-s.common.lib.service.getByIdentifier" (dict "rootContext" $rootContext "id" .identifier) | fromYaml ) }}
|
||||
{{- if not $service }}
|
||||
{{- fail (printf "No enabled Service found with this identifier. (route: '%s', identifier: '%s')" $routeObject.identifier .identifier) }}
|
||||
{{- end }}
|
||||
{{- $serviceName = $service.name }}
|
||||
{{- $defaultServicePort = include "bjw-s.common.lib.service.primaryPort" (dict "rootContext" $rootContext "serviceObject" $service) | fromYaml }}
|
||||
{{- end }}
|
||||
- group: {{ .group | default "" | quote}}
|
||||
kind: {{ .kind | default "Service" }}
|
||||
name: {{ $serviceName }}
|
||||
namespace: {{ .namespace | default $rootContext.Release.Namespace }}
|
||||
port: {{ .port | default $defaultServicePort.port }}
|
||||
weight: {{ include "bjw-s.common.lib.defaultKeepNonNullValue" (dict "value" .weight "default" 1) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or (eq $routeKind "HTTPRoute") (eq $routeKind "GRPCRoute") }}
|
||||
{{- with .matches }}
|
||||
matches: {{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .filters }}
|
||||
filters:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
filters: {{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .sessionPersistence }}
|
||||
sessionPersistence: {{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if (eq $routeKind "HTTPRoute") }}
|
||||
{{- with .timeouts }}
|
||||
timeouts:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- if (eq $routeKind "HTTPRoute") }}
|
||||
{{- with .timeouts }}
|
||||
timeouts: {{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue