Skip to content

Commit

Permalink
Re-add ingress files to prod (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
yhtMinceraft1010X authored Oct 27, 2023
1 parent 1c28242 commit 02bc65b
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 6 deletions.
13 changes: 13 additions & 0 deletions deployment/gke-prod-manifests/frontend-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: frontend-ingress
annotations:
networking.gke.io/managed-certificates: gke-managed-cert
kubernetes.io/ingress.class: "gce"
spec:
defaultBackend:
service:
name: frontend
port:
number: 3000
1 change: 0 additions & 1 deletion deployment/gke-prod-manifests/frontend-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ spec:
targetPort: 3000
selector:
io.kompose.service: frontend
type: LoadBalancer
status:
loadBalancer: {}
6 changes: 5 additions & 1 deletion deployment/gke-prod-manifests/gateway-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
- name: WS_COLLABORATION_PROXY_PORT
value: "4003"
- name: FRONTEND_ADDRESS
value: "http://www.codeparty.org"
value: "https://www.codeparty.org"
image: asia-southeast1-docker.pkg.dev/peerprep-group11-prod/codeparty-prod-images/gateway:latest
name: gateway
ports:
Expand All @@ -44,6 +44,10 @@ spec:
- containerPort: 4003
hostPort: 4003
protocol: TCP
# Needed for health check
- containerPort: 8080
hostPort: 8080
protocol: TCP
resources:
# You must specify requests for CPU to autoscale
# based on CPU utilization
Expand Down
13 changes: 13 additions & 0 deletions deployment/gke-prod-manifests/gateway-http-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: gateway-http-ingress
annotations:
networking.gke.io/managed-certificates: gke-managed-cert
kubernetes.io/ingress.class: "gce"
spec:
defaultBackend:
service:
name: gateway
port:
number: 4000
1 change: 0 additions & 1 deletion deployment/gke-prod-manifests/gateway-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,5 @@ spec:
targetPort: 8080
selector:
io.kompose.service: gateway
type: LoadBalancer
status:
loadBalancer: {}
13 changes: 13 additions & 0 deletions deployment/gke-prod-manifests/gateway-wscollaboration-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: gateway-wscollaboration-ingress
annotations:
networking.gke.io/managed-certificates: gke-managed-cert
kubernetes.io/ingress.class: "gce"
spec:
defaultBackend:
service:
name: gateway
port:
number: 4003
13 changes: 13 additions & 0 deletions deployment/gke-prod-manifests/gateway-wsmatch-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: gateway-wsmatch-ingress
annotations:
networking.gke.io/managed-certificates: gke-managed-cert
kubernetes.io/ingress.class: "gce"
spec:
defaultBackend:
service:
name: gateway
port:
number: 4002
10 changes: 10 additions & 0 deletions deployment/gke-prod-manifests/gke-managed-cert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: networking.gke.io/v1
kind: ManagedCertificate
metadata:
name: gke-managed-cert
spec:
domains:
- www.codeparty.org
- api.codeparty.org
- wsmatch.codeparty.org
- wscollab.codeparty.org
6 changes: 3 additions & 3 deletions deployment/prod-dockerfiles/Dockerfile.frontend-prod
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ RUN yarn prisma generate
ARG NEXT_PUBLIC_FRONTEND_FIREBASE_CONFIG_ARG
ENV NEXT_PUBLIC_FRONTEND_FIREBASE_CONFIG=$NEXT_PUBLIC_FRONTEND_FIREBASE_CONFIG_ARG

ENV NEXT_PUBLIC_HTTP_PROXY_GATEWAY_ADDRESS="http://api.codeparty.org:4000/"
ENV NEXT_PUBLIC_WS_MATCH_PROXY_GATEWAY_ADDRESS="http://api.codeparty.org:4002"
ENV NEXT_PUBLIC_WS_COLLABORATION_PROXY_GATEWAY_ADDRESS="http://api.codeparty.org:4003"
ENV NEXT_PUBLIC_HTTP_PROXY_GATEWAY_ADDRESS="https://api.codeparty.org/"
ENV NEXT_PUBLIC_WS_MATCH_PROXY_GATEWAY_ADDRESS="https://wsmatch.codeparty.org"
ENV NEXT_PUBLIC_WS_COLLABORATION_PROXY_GATEWAY_ADDRESS="https://wscollab.codeparty.org"

RUN yarn build

Expand Down

0 comments on commit 02bc65b

Please sign in to comment.