Centralize Envoy Gateway routing
This commit is contained in:
parent
9acfeb7d48
commit
ba0a88b708
20 changed files with 184 additions and 318 deletions
19
infrastructure/gateway/envoy/envoyproxy.yaml
Normal file
19
infrastructure/gateway/envoy/envoyproxy.yaml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
apiVersion: gateway.envoyproxy.io/v1alpha1
|
||||
kind: EnvoyProxy
|
||||
metadata:
|
||||
name: public-gateway-nodeport
|
||||
namespace: apps
|
||||
spec:
|
||||
logging:
|
||||
level:
|
||||
default: warn
|
||||
provider:
|
||||
type: Kubernetes
|
||||
kubernetes:
|
||||
envoyDeployment:
|
||||
pod:
|
||||
nodeSelector:
|
||||
workload: app
|
||||
envoyService:
|
||||
type: NodePort
|
||||
externalTrafficPolicy: Local
|
||||
6
infrastructure/gateway/envoy/gatewayclass.yaml
Normal file
6
infrastructure/gateway/envoy/gatewayclass.yaml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: GatewayClass
|
||||
metadata:
|
||||
name: envoy-gateway-class
|
||||
spec:
|
||||
controllerName: gateway.envoyproxy.io/gatewayclass-controller
|
||||
19
infrastructure/gateway/envoy/routes/argocd.yaml
Normal file
19
infrastructure/gateway/envoy/routes/argocd.yaml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: argocd
|
||||
namespace: argocd
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: public-gateway
|
||||
namespace: apps
|
||||
hostnames:
|
||||
- "www.symcrest.com"
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /internal/ops/gitops
|
||||
backendRefs:
|
||||
- name: argocd-server
|
||||
port: 80
|
||||
45
infrastructure/gateway/envoy/routes/forgejo.yaml
Normal file
45
infrastructure/gateway/envoy/routes/forgejo.yaml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: forgejo
|
||||
namespace: forgejo
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: public-gateway
|
||||
namespace: apps
|
||||
hostnames:
|
||||
- "www.symcrest.com"
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: Exact
|
||||
value: /internal/dev/git
|
||||
filters:
|
||||
- type: RequestRedirect
|
||||
requestRedirect:
|
||||
path:
|
||||
type: ReplaceFullPath
|
||||
replaceFullPath: /internal/dev/git/
|
||||
statusCode: 301
|
||||
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /internal/dev/git/
|
||||
filters:
|
||||
- type: URLRewrite
|
||||
urlRewrite:
|
||||
path:
|
||||
type: ReplacePrefixMatch
|
||||
replacePrefixMatch: /
|
||||
backendRefs:
|
||||
- name: forgejo
|
||||
port: 3000
|
||||
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /v2/
|
||||
backendRefs:
|
||||
- name: forgejo
|
||||
port: 3000
|
||||
37
infrastructure/gateway/envoy/routes/longhorn.yaml
Normal file
37
infrastructure/gateway/envoy/routes/longhorn.yaml
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: longhorn
|
||||
namespace: longhorn-system
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: public-gateway
|
||||
namespace: apps
|
||||
hostnames:
|
||||
- "www.symcrest.com"
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: Exact
|
||||
value: /internal/ops/volumes
|
||||
filters:
|
||||
- type: RequestRedirect
|
||||
requestRedirect:
|
||||
path:
|
||||
type: ReplaceFullPath
|
||||
replaceFullPath: /internal/ops/volumes/
|
||||
statusCode: 301
|
||||
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /internal/ops/volumes/
|
||||
filters:
|
||||
- type: URLRewrite
|
||||
urlRewrite:
|
||||
path:
|
||||
type: ReplacePrefixMatch
|
||||
replacePrefixMatch: /
|
||||
backendRefs:
|
||||
- name: longhorn-frontend
|
||||
port: 80
|
||||
19
infrastructure/gateway/envoy/routes/openproject.yaml
Normal file
19
infrastructure/gateway/envoy/routes/openproject.yaml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: openproject
|
||||
namespace: openproject
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: public-gateway
|
||||
namespace: apps
|
||||
hostnames:
|
||||
- "www.symcrest.com"
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /internal/dev/projectmanagement
|
||||
backendRefs:
|
||||
- name: openproject
|
||||
port: 8080
|
||||
31
infrastructure/gateway/envoy/routes/pgadmin.yaml
Normal file
31
infrastructure/gateway/envoy/routes/pgadmin.yaml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: pgadmin
|
||||
namespace: pgadmin
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: public-gateway
|
||||
namespace: apps
|
||||
hostnames:
|
||||
- "www.symcrest.com"
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: Exact
|
||||
value: /internal/dev/dbadmin/postgres
|
||||
filters:
|
||||
- type: RequestRedirect
|
||||
requestRedirect:
|
||||
path:
|
||||
type: ReplaceFullPath
|
||||
replaceFullPath: /internal/dev/dbadmin/postgres/
|
||||
statusCode: 301
|
||||
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /internal/dev/dbadmin/postgres/
|
||||
backendRefs:
|
||||
- name: pgadmin
|
||||
port: 80
|
||||
19
infrastructure/gateway/envoy/routes/symcrest-web.yaml
Normal file
19
infrastructure/gateway/envoy/routes/symcrest-web.yaml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: symcrest-web
|
||||
namespace: apps
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: public-gateway
|
||||
namespace: apps
|
||||
hostnames:
|
||||
- "www.symcrest.com"
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /
|
||||
backendRefs:
|
||||
- name: symcrest-web
|
||||
port: 80
|
||||
19
infrastructure/gateway/envoy/shared-public-gateway.yaml
Normal file
19
infrastructure/gateway/envoy/shared-public-gateway.yaml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: public-gateway
|
||||
namespace: apps
|
||||
spec:
|
||||
gatewayClassName: envoy-gateway-class
|
||||
infrastructure:
|
||||
parametersRef:
|
||||
group: gateway.envoyproxy.io
|
||||
kind: EnvoyProxy
|
||||
name: public-gateway-nodeport
|
||||
listeners:
|
||||
- name: http
|
||||
protocol: HTTP
|
||||
port: 80
|
||||
allowedRoutes:
|
||||
namespaces:
|
||||
from: All
|
||||
Loading…
Add table
Add a link
Reference in a new issue