switch to gateway api

This commit is contained in:
2025-11-12 15:30:49 -06:00
parent 3fc3765da6
commit b9fcd8cf96
4 changed files with 22 additions and 42 deletions

View File

@@ -0,0 +1,17 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ include "stage.fullname" . }}
spec:
parentRefs:
- name: {{ .Values.gateway.name }}
namespace: {{ .Values.gateway.namespace }}
rules:
- backendRefs:
- name: {{ include "stage.fullname" $ }}
port: {{ $.Values.service.port }}
matches:
- path:
type: PathPrefix
value: /{{ .Values.ontime.prefix}}

View File

@@ -1,33 +0,0 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "stage.fullname" . }}
labels:
{{- include "stage.labels" . | nindent 4 }}
annotations:
{{- if .Values.ingress.tls.issuer }}
cert-manager.io/cluster-issuer: {{ .Values.ingress.tls.issuer}}
{{- end}}
spec:
{{- with .Values.ingress.className }}
ingressClassName: {{ . }}
{{- end }}
rules:
- http:
paths:
- path: /{{ .Values.ontime.prefix}}
pathType: ImplementationSpecific
backend:
service:
name: {{ include "stage.fullname" $ }}
port:
number: {{ $.Values.service.port }}
{{- if .Values.ingress.hostname }}
host: {{ .Values.ingress.hostname | quote }}
{{- if .Values.ingress.tls.enabled }}
tls:
- hosts:
- {{ .Values.ingress.hostname | quote }}
secretName: {{ include "stage.fullname" . }}-cert
{{- end }}
{{- end }}

View File

@@ -42,13 +42,9 @@ service:
type: ClusterIP
port: 4001
# This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/
ingress:
className: ""
# hostname: "ontime.example.com"
tls:
enabled: false
issuer: ''
gateway:
name: "ontime"
namespace: "kube-system"
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious