Centralize Envoy Gateway routing

This commit is contained in:
Arvind Prabhakar 2026-09-05 18:34:45 +00:00
commit ba0a88b708
20 changed files with 184 additions and 318 deletions

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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