84 lines
1.8 KiB
Plaintext
84 lines
1.8 KiB
Plaintext
# Frontend Deployment
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: lifesub-web
|
|
namespace: ${namespace}
|
|
spec:
|
|
replicas: ${replicas}
|
|
selector:
|
|
matchLabels:
|
|
app: lifesub-web
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: lifesub-web
|
|
spec:
|
|
containers:
|
|
- name: lifesub-web
|
|
image: ${lifesub_web_image_path}
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- containerPort: ${export_port}
|
|
resources:
|
|
requests:
|
|
cpu: ${resources_requests_cpu}
|
|
memory: ${resources_requests_memory}
|
|
limits:
|
|
cpu: ${resources_limits_cpu}
|
|
memory: ${resources_limits_memory}
|
|
|
|
---
|
|
# Frontend Service
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: lifesub-web
|
|
namespace: ${namespace}
|
|
spec:
|
|
selector:
|
|
app: lifesub-web
|
|
ports:
|
|
- port: 80
|
|
targetPort: ${export_port}
|
|
type: LoadBalancer
|
|
|
|
---
|
|
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: lifesub
|
|
namespace: ${namespace}
|
|
annotations:
|
|
kubernetes.io/ingress.class: nginx
|
|
nginx.ingress.kubernetes.io/rewrite-target: /$2
|
|
nginx.ingress.kubernetes.io/use-regex: "true"
|
|
spec:
|
|
ingressClassName: nginx
|
|
rules:
|
|
- http:
|
|
paths:
|
|
- path: /member(/|$)(.*)
|
|
pathType: ImplementationSpecific
|
|
backend:
|
|
service:
|
|
name: member
|
|
port:
|
|
number: 80
|
|
|
|
- path: /mysub(/|$)(.*)
|
|
pathType: ImplementationSpecific
|
|
backend:
|
|
service:
|
|
name: mysub
|
|
port:
|
|
number: 80
|
|
|
|
- path: /recommend(/|$)(.*)
|
|
pathType: ImplementationSpecific
|
|
backend:
|
|
service:
|
|
name: recommend
|
|
port:
|
|
number: 80 |