aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@t-mobile.pl>2023-10-06 08:32:00 +0000
committerGerrit Code Review <gerrit@onap.org>2023-10-06 08:32:00 +0000
commit11a7c5036e8d5b7e4c9bf3c2d0c06dc0ebef9ba8 (patch)
tree8d3e9681aa0597aff879f1640bdb0522a614c57b
parent5faef933c24e27e439bd109c29a0278f43e95968 (diff)
parent8d57918746be63112542f7d47602adc043398565 (diff)
Merge "[COMMON] Update Gateway-API resource definitions"
-rw-r--r--kubernetes/common/common/templates/_ingress.tpl39
1 files 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) }}