switch to gateway api
This commit is contained in:
@@ -61,8 +61,8 @@ rules:
|
|||||||
- verbs:
|
- verbs:
|
||||||
- "*"
|
- "*"
|
||||||
apiGroups:
|
apiGroups:
|
||||||
- "networking.k8s.io"
|
- "gateway.networking.k8s.io"
|
||||||
resources:
|
resources:
|
||||||
- "ingresses"
|
- "httproutes"
|
||||||
|
|
||||||
# +kubebuilder:scaffold:rules
|
# +kubebuilder:scaffold:rules
|
||||||
|
|||||||
17
helm-charts/stage/templates/http-route.yaml
Normal file
17
helm-charts/stage/templates/http-route.yaml
Normal 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}}
|
||||||
@@ -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 }}
|
|
||||||
@@ -42,13 +42,9 @@ service:
|
|||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
port: 4001
|
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/
|
gateway:
|
||||||
ingress:
|
name: "ontime"
|
||||||
className: ""
|
namespace: "kube-system"
|
||||||
# hostname: "ontime.example.com"
|
|
||||||
tls:
|
|
||||||
enabled: false
|
|
||||||
issuer: ''
|
|
||||||
|
|
||||||
resources: {}
|
resources: {}
|
||||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
|||||||
Reference in New Issue
Block a user