From 8d57918746be63112542f7d47602adc043398565 Mon Sep 17 00:00:00 2001 From: Andreas Geissler Date: Fri, 29 Sep 2023 14:02:04 +0200 Subject: [COMMON] Update Gateway-API resource definitions Update the definitions based on test results to avoid ArgoCD resyncs. Issue-ID: OOM-3184 Change-Id: I0e87d0bbea4a45a480fe078e4d9ae7a0f22ff764 Signed-off-by: Andreas Geissler --- kubernetes/common/common/templates/_ingress.tpl | 39 ++++++++++++++++++------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/kubernetes/common/common/templates/_ingress.tpl b/kubernetes/common/common/templates/_ingress.tpl index c469bc7c7e..ca23c75896 100644 --- a/kubernetes/common/common/templates/_ingress.tpl +++ b/kubernetes/common/common/templates/_ingress.tpl @@ -570,17 +570,22 @@ metadata: name: {{ $baseaddr }}-{{ $service.exposedPort }}-route spec: parentRefs: + - group: gateway.networking.k8s.io + kind: Gateway {{- if eq $gateway "-" }} - - name: {{ $baseaddr }}-gateway + name: {{ $baseaddr }}-gateway {{- else }} - - name: {{ $gateway }} + name: {{ $gateway }} {{- end }} namespace: {{ $namespace }} sectionName: udp-{{ $service.exposedPort }} rules: - backendRefs: - - name: {{ $service.name }} + - group: '' + kind: Service + name: {{ $service.name }} port: {{ $service.port }} + weight: 1 {{- else if eq $protocol "tcp" }} --- apiVersion: gateway.networking.k8s.io/v1alpha2 @@ -589,17 +594,22 @@ metadata: name: {{ $baseaddr }}-{{ $service.exposedPort }}-route spec: parentRefs: + - group: gateway.networking.k8s.io + kind: Gateway {{- if eq $gateway "-" }} - - name: {{ $baseaddr }}-gateway + name: {{ $baseaddr }}-gateway {{- else }} - - name: {{ $gateway }} + name: {{ $gateway }} {{- end }} namespace: {{ $namespace }} sectionName: tcp-{{ $service.exposedPort }} rules: - backendRefs: - - name: {{ $service.name }} + - group: '' + kind: Service + name: {{ $service.name }} port: {{ $service.port }} + weight: 1 {{- else if eq $protocol "http" }} --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -608,10 +618,12 @@ metadata: name: {{ $baseaddr }}-http-route spec: parentRefs: + - group: gateway.networking.k8s.io + kind: Gateway {{- if eq $gateway "-" }} - - name: {{ $baseaddr }}-gateway + name: {{ $baseaddr }}-gateway {{- else }} - - name: {{ $gateway }} + name: {{ $gateway }} {{- end }} namespace: {{ $namespace }} {{- if (include "common.ingress._tlsRedirect" (dict "dot" $dot)) }} @@ -623,8 +635,11 @@ spec: - {{ include "ingress.config.host" (dict "dot" $dot "baseaddr" $baseaddr) }} rules: - backendRefs: - - name: {{ $service.name }} + - group: '' + kind: Service + name: {{ $service.name }} port: {{ $service.port }} + weight: 1 matches: - path: type: PathPrefix @@ -637,10 +652,12 @@ metadata: name: {{ $baseaddr }}-redirect-route spec: parentRefs: + - group: gateway.networking.k8s.io + kind: Gateway {{- if eq $gateway "-" }} - - name: {{ $baseaddr }}-gateway + name: {{ $baseaddr }}-gateway {{- else }} - - name: {{ $gateway }} + name: {{ $gateway }} {{- end }} namespace: {{ $namespace }} sectionName: {{ include "common.ingress._gatewayHTTPListener" (dict "dot" $dot) }} -- cgit 1.2.3-korg