Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions charts/site-manager/templates/httproute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{{- $hasHttpRouteApi := .Capabilities.APIVersions.Has "gateway.networking.k8s.io/v1" -}}
{{- $isKubernetes := eq .Values.PAAS_PLATFORM "KUBERNETES" -}}
{{- if and $hasHttpRouteApi $isKubernetes -}}
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ .Chart.Name }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ .Chart.Name }}
spec:
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: {{ .Values.httpRoute.gatewayName | quote }}
namespace: {{ .Values.httpRoute.gatewayNamespace | quote }}
{{- if .Values.ingress.name }}
hostnames:
- {{ .Values.ingress.name | quote }}
{{- end }}
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- group: ""
kind: Service
name: {{ .Chart.Name }}
port: 443
weight: 1
{{- end }}
5 changes: 5 additions & 0 deletions charts/site-manager/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{{- if .Values.ingress.create }}
apiVersion: {{ include "site-manager.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ .Chart.Name }}
namespace: {{ .Release.Namespace }}
annotations:
# Prevent gateway-api-converter from auto-converting this legacy Ingress
# when Gateway API resources (HTTPRoute, etc) are managed by chart.
gateway-api-converter.netcracker.com/ignore: "true"
{{- if .Values.tls.enabled }}
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
{{- if .Values.tls.defaultIngressTls }}
Expand Down Expand Up @@ -48,3 +52,4 @@ spec:
port:
number: 443
{{- end }}
{{- end }}
8 changes: 8 additions & 0 deletions charts/site-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ ingress:
name: ""
className: ""

# Gateway API (HTTPRoute) configuration.
# Resources are created only when:
# 1) gateway.networking.k8s.io/v1 CRDs are present
# 2) PAAS_PLATFORM=KUBERNETES
httpRoute:
gatewayName: default-external-gateway
gatewayNamespace: envoy-gateway

limits:
cpu: "20m"
memory: "100Mi"
Expand Down
Loading