diff --git a/helm/incidentops/templates/web-deployment.yaml b/helm/incidentops/templates/web-deployment.yaml new file mode 100644 index 0000000..3f925f3 --- /dev/null +++ b/helm/incidentops/templates/web-deployment.yaml @@ -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 }} diff --git a/helm/incidentops/templates/web-service.yaml b/helm/incidentops/templates/web-service.yaml new file mode 100644 index 0000000..a7ec3a7 --- /dev/null +++ b/helm/incidentops/templates/web-service.yaml @@ -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