62 lines
1.8 KiB
YAML
62 lines
1.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "planet.fullname" . }}-frontend
|
|
labels:
|
|
{{- include "planet.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: frontend
|
|
spec:
|
|
replicas: {{ .Values.frontend.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "planet.selectorLabels" . | nindent 6 }}
|
|
app.kubernetes.io/component: frontend
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "planet.selectorLabels" . | nindent 8 }}
|
|
app.kubernetes.io/component: frontend
|
|
spec:
|
|
{{- with .Values.global.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: frontend
|
|
image: {{ include "planet.image" (dict "root" . "repository" .Values.frontend.image.repository) | quote }}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 3000
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
initialDelaySeconds: 20
|
|
periodSeconds: 20
|
|
resources:
|
|
{{- toYaml .Values.frontend.resources | nindent 12 }}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ include "planet.fullname" . }}-frontend
|
|
labels:
|
|
{{- include "planet.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: frontend
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- name: http
|
|
port: {{ .Values.frontend.service.port }}
|
|
targetPort: http
|
|
selector:
|
|
{{- include "planet.selectorLabels" . | nindent 4 }}
|
|
app.kubernetes.io/component: frontend
|