chore(helm): add web deployment and service templates

This commit is contained in:
2025-01-17 12:00:00 -05:00
parent ae037b8ae9
commit 1b9ab0f9e6
2 changed files with 61 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "incidentops.fullname" . }}-web
labels:
{{- include "incidentops.labels" . | nindent 4 }}
app.kubernetes.io/component: web
spec:
replicas: {{ .Values.web.replicas }}
selector:
matchLabels:
{{- include "incidentops.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: web
template:
metadata:
labels:
{{- include "incidentops.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: web
spec:
containers:
- name: web
image: "{{ .Values.web.image }}:{{ .Values.web.tag }}"
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: {{ .Values.web.port }}
protocol: TCP
env:
- name: NEXT_PUBLIC_API_URL
value: "http://{{ .Values.ingress.host }}/api"
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 5
periodSeconds: 5
resources:
{{- toYaml .Values.web.resources | nindent 12 }}

View File

@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "incidentops.fullname" . }}-web
labels:
{{- include "incidentops.labels" . | nindent 4 }}
app.kubernetes.io/component: web
spec:
type: ClusterIP
ports:
- port: {{ .Values.web.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "incidentops.selectorLabels" . | nindent 4 }}
app.kubernetes.io/component: web