108 lines
3.2 KiB
YAML
108 lines
3.2 KiB
YAML
---
|
|
# Backend Deployment
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "oramap.fullname" . }}-backend
|
|
labels:
|
|
app: {{ include "oramap.name" . }}-backend
|
|
chart: {{ include "oramap.chart" . }}
|
|
release: {{ .Release.Name }}
|
|
heritage: {{ .Release.Service }}
|
|
component: backend
|
|
spec:
|
|
replicas: {{ .Values.backend.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
app: {{ include "oramap.name" . }}-backend
|
|
release: {{ .Release.Name }}
|
|
component: backend
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ include "oramap.name" . }}-backend
|
|
release: {{ .Release.Name }}
|
|
component: backend
|
|
spec:
|
|
containers:
|
|
- name: backend
|
|
image: "{{ .Values.backend.image.repository }}:{{ .Values.backend.image.tag }}"
|
|
imagePullPolicy: {{ .Values.backend.image.pullPolicy }}
|
|
ports:
|
|
- containerPort: {{ .Values.backend.containerPort }}
|
|
name: http
|
|
env:
|
|
- name: NODE_ENV
|
|
value: "production"
|
|
- name: PORT
|
|
value: "{{ .Values.backend.containerPort }}"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api/health
|
|
port: http
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 30
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/health
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
resources:
|
|
{{- toYaml .Values.backend.resources | nindent 12 }}
|
|
---
|
|
# Frontend Deployment
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "oramap.fullname" . }}-frontend
|
|
labels:
|
|
app: {{ include "oramap.name" . }}-frontend
|
|
chart: {{ include "oramap.chart" . }}
|
|
release: {{ .Release.Name }}
|
|
heritage: {{ .Release.Service }}
|
|
component: frontend
|
|
spec:
|
|
replicas: {{ .Values.frontend.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
app: {{ include "oramap.name" . }}-frontend
|
|
release: {{ .Release.Name }}
|
|
component: frontend
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ include "oramap.name" . }}-frontend
|
|
release: {{ .Release.Name }}
|
|
component: frontend
|
|
spec:
|
|
containers:
|
|
- name: frontend
|
|
image: "{{ .Values.frontend.image.repository }}:{{ .Values.frontend.image.tag }}"
|
|
imagePullPolicy: {{ .Values.frontend.image.pullPolicy }}
|
|
ports:
|
|
- containerPort: {{ .Values.frontend.containerPort }}
|
|
name: http
|
|
volumeMounts:
|
|
- name: nginx-config
|
|
mountPath: /etc/nginx/conf.d/default.conf
|
|
subPath: default.conf
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 30
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
resources:
|
|
{{- toYaml .Values.frontend.resources | nindent 12 }}
|
|
volumes:
|
|
- name: nginx-config
|
|
configMap:
|
|
name: {{ include "oramap.fullname" . }}-nginx-config
|