iceshrimp/chart/templates/deployment.yaml

83 lines
2.5 KiB
YAML
Raw Normal View History

2023-05-10 23:07:45 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
2023-07-02 22:18:30 +00:00
name: {{ include "firefish.fullname" . }}
2023-05-10 23:07:45 +00:00
labels:
2023-07-02 22:18:30 +00:00
{{- include "firefish.labels" . | nindent 4 }}
2023-05-10 23:07:45 +00:00
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
2023-07-02 22:18:30 +00:00
{{- include "firefish.selectorLabels" . | nindent 6 }}
2023-05-10 23:07:45 +00:00
template:
metadata:
annotations:
checksum/secret-config: {{ include ( print $.Template.BasePath "/secret-config.yaml" ) . | sha256sum | quote }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
2023-07-02 22:18:30 +00:00
{{- include "firefish.selectorLabels" . | nindent 8 }}
2023-05-10 23:07:45 +00:00
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
2023-07-02 22:18:30 +00:00
serviceAccountName: {{ include "firefish.serviceAccountName" . }}
2023-05-10 23:07:45 +00:00
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
volumes:
- name: config-volume
secret:
2023-07-02 22:18:30 +00:00
secretName: {{ template "firefish.fullname" . }}-config
2023-05-10 23:07:45 +00:00
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
2023-05-16 20:26:11 +00:00
command:
- pnpm
- run
- start
2023-05-10 23:07:45 +00:00
env:
- name: "NODE_ENV"
value: "production"
volumeMounts:
- name: config-volume
2023-07-02 22:18:30 +00:00
mountPath: /firefish/.config
2023-05-10 23:07:45 +00:00
ports:
- name: http
containerPort: 3000
protocol: TCP
startupProbe:
httpGet:
path: /
port: http
failureThreshold: 30
periodSeconds: 10
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}