Centralize Envoy Gateway routing
This commit is contained in:
parent
9acfeb7d48
commit
ba0a88b708
20 changed files with 184 additions and 318 deletions
|
|
@ -1,21 +0,0 @@
|
|||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: {{ .Values.route.name }}
|
||||
namespace: {{ .Values.route.namespace }}
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: {{ .Values.route.gatewayName }}
|
||||
namespace: {{ .Values.route.gatewayNamespace }}
|
||||
hostnames:
|
||||
{{- range .Values.route.hostnames }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: {{ .Values.argocd.basePath | quote }}
|
||||
backendRefs:
|
||||
- name: {{ .Values.route.serviceName }}
|
||||
port: {{ .Values.route.servicePort }}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: {{ .Values.route.name }}
|
||||
namespace: {{ .Values.namespace }}
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: {{ .Values.route.gatewayName }}
|
||||
namespace: {{ .Values.route.gatewayNamespace }}
|
||||
hostnames:
|
||||
{{- range .Values.route.hostnames }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: Exact
|
||||
value: {{ .Values.route.basePath | quote }}
|
||||
filters:
|
||||
- type: RequestRedirect
|
||||
requestRedirect:
|
||||
path:
|
||||
type: ReplaceFullPath
|
||||
replaceFullPath: {{ printf "%s/" .Values.route.basePath | quote }}
|
||||
statusCode: 301
|
||||
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: {{ printf "%s/" .Values.route.basePath | quote }}
|
||||
filters:
|
||||
- type: URLRewrite
|
||||
urlRewrite:
|
||||
path:
|
||||
type: ReplacePrefixMatch
|
||||
replacePrefixMatch: /
|
||||
backendRefs:
|
||||
- name: {{ .Values.route.serviceName }}
|
||||
port: {{ .Values.route.servicePort }}
|
||||
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /v2/
|
||||
backendRefs:
|
||||
- name: {{ .Values.route.serviceName }}
|
||||
port: {{ .Values.route.servicePort }}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: {{ .Values.route.name }}
|
||||
namespace: {{ .Values.route.namespace }}
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: {{ .Values.route.gatewayName }}
|
||||
namespace: {{ .Values.route.gatewayNamespace }}
|
||||
hostnames:
|
||||
{{- range .Values.route.hostnames }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: Exact
|
||||
value: {{ .Values.longhorn.basePath | quote }}
|
||||
filters:
|
||||
- type: RequestRedirect
|
||||
requestRedirect:
|
||||
path:
|
||||
type: ReplaceFullPath
|
||||
replaceFullPath: {{ printf "%s/" .Values.longhorn.basePath | quote }}
|
||||
statusCode: 301
|
||||
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: {{ printf "%s/" .Values.longhorn.basePath | quote }}
|
||||
filters:
|
||||
- type: URLRewrite
|
||||
urlRewrite:
|
||||
path:
|
||||
type: ReplacePrefixMatch
|
||||
replacePrefixMatch: {{ .Values.longhorn.rewriteTo | quote }}
|
||||
backendRefs:
|
||||
- name: {{ .Values.route.serviceName }}
|
||||
port: {{ .Values.route.servicePort }}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: openproject
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: {{ .Values.gateway.name }}
|
||||
namespace: {{ .Values.gateway.namespace }}
|
||||
|
||||
hostnames:
|
||||
{{- range .Values.hostnames }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: {{ .Values.basePath | quote }}
|
||||
|
||||
backendRefs:
|
||||
- name: {{ .Values.service.name }}
|
||||
port: {{ .Values.service.port }}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: {{ .Values.route.name }}
|
||||
namespace: {{ .Values.namespace }}
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: {{ .Values.route.gatewayName }}
|
||||
namespace: {{ .Values.route.gatewayNamespace }}
|
||||
hostnames:
|
||||
{{- range .Values.route.hostnames }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: Exact
|
||||
value: {{ .Values.route.basePath | quote }}
|
||||
filters:
|
||||
- type: RequestRedirect
|
||||
requestRedirect:
|
||||
path:
|
||||
type: ReplaceFullPath
|
||||
replaceFullPath: {{ printf "%s/" .Values.route.basePath | quote }}
|
||||
statusCode: 301
|
||||
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: {{ printf "%s/" .Values.route.basePath | quote }}
|
||||
backendRefs:
|
||||
- name: {{ .Values.route.serviceName }}
|
||||
port: {{ .Values.route.servicePort }}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: {{ .Values.route.name }}
|
||||
namespace: {{ .Values.namespace }}
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: {{ .Values.route.gatewayName }}
|
||||
namespace: {{ .Values.route.gatewayNamespace }}
|
||||
hostnames:
|
||||
{{- range .Values.route.hostnames }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /
|
||||
backendRefs:
|
||||
- name: {{ .Values.service.name }}
|
||||
port: {{ .Values.service.port }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue