Skip to content

Commit

Permalink
refactor(apps/dev): migrate ingress to http gateway and routes (#740)
Browse files Browse the repository at this point in the history
Signed-off-by: wuhuizuo <wuhuizuo@126.com>
  • Loading branch information
wuhuizuo committed Oct 27, 2023
1 parent fb1c944 commit 00f574f
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 24 deletions.
17 changes: 17 additions & 0 deletions apps/dev/gateways.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: gateways
namespace: apps
spec:
interval: 5m0s
sourceRef:
kind: GitRepository
name: flux-system
namespace: flux-system
path: ./apps/dev/gateways
prune: true
wait: true
postBuild:
substitute:
INGRESS_STATIC_IP_NAME: prow-dev-tidb-net-ip
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ spec:
listeners:
- name: https
protocol: HTTPS
port: 80
port: 443
tls:
mode: Terminate
certificateRefs:
- name: prow-tls
namesppace: apps
namespace: apps
addresses:
- type: NamedAddress
value: ${INGRESS_STATIC_IP_NAME}
value: ${INGRESS_STATIC_IP_NAME}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: apps
resources:
- gke-gateway.yaml
3 changes: 2 additions & 1 deletion apps/dev/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Kustomization
resources:
- ../_base
- namespace.yaml
- gateways.yaml
- prow-crd.yaml
- prow
- tekton
- tekton
3 changes: 2 additions & 1 deletion apps/dev/prow/release/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ kind: Kustomization
resources:
- release.yaml
- frontend-config.yaml
- gce-ingress.yaml
- wip-http-routes.yaml
# - gce-ingress.yaml
16 changes: 2 additions & 14 deletions apps/dev/prow/release/wip-http-routes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,10 @@ spec:
rules:
- backendRefs:
- name: prow-deck
port: 8080
port: 80
- matches:
- path:
value: /hook
backendRefs:
- name: prow-hook
port: 8080
- matches:
- path:
value: /tichi
backendRefs:
- name: prow-ti-community-owners
port: 8080
- matches:
- path:
value: /ti-community-owners
backendRefs:
- name: prow-hook
port: 8080
port: 80
5 changes: 3 additions & 2 deletions apps/dev/tekton/ingress/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ingress-dashboard.yaml
- ingress-event-listener.yaml
# - ingress-dashboard.yaml
# - ingress-event-listener.yaml
- wip-http-routes.yaml
7 changes: 4 additions & 3 deletions apps/dev/tekton/ingress/wip-http-routes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,22 @@ spec:
value: "${path_for_hook}(/|$)(.*)"
backendRefs:
- name: el-trigger-groups-listener
namespace: ee-cd
port: 8080
filters:
- type: URLRewrite
urlRewrite:
path:
type: ReplacePrefixMatch
replacePrefixMatch: /$2
- name: dashboard
matches:
- matches:
- path:
type: PathPrefix
value: "${path_for_dashboard}(/|$)(.*)"
backendRefs:
- name: tekton-dashboard
port: 8080
namespace: tekton-pipelines
port: 9097
filters:
- type: URLRewrite
urlRewrite:
Expand Down

0 comments on commit 00f574f

Please sign in to comment.