2023-05-11 08:07:45 +09:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
2023-08-21 23:14:53 +09:00
|
|
|
name: {{ include "iceshrimp.fullname" . }}
|
2023-05-11 08:07:45 +09:00
|
|
|
labels:
|
2023-08-21 23:14:53 +09:00
|
|
|
{{- include "iceshrimp.labels" . | nindent 4 }}
|
2023-05-11 08:07:45 +09:00
|
|
|
spec:
|
2024-06-25 22:34:46 +09:00
|
|
|
{{- if not .Values.autoscaling.enabled }}
|
2023-05-11 08:07:45 +09:00
|
|
|
replicas: {{ .Values.replicaCount }}
|
|
|
|
{{- end }}
|
2024-06-25 22:34:46 +09:00
|
|
|
|
|
|
|
{{- if .Values.iceshrimp.deploymentStrategy }}
|
|
|
|
strategy:
|
|
|
|
{{- toYaml .Values.iceshrimp.deploymentStrategy | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
|
2023-05-11 08:07:45 +09:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
2023-08-21 23:14:53 +09:00
|
|
|
{{- include "iceshrimp.selectorLabels" . | nindent 6 }}
|
2023-05-11 08:07:45 +09: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-08-21 23:14:53 +09:00
|
|
|
{{- include "iceshrimp.selectorLabels" . | nindent 8 }}
|
2023-05-11 08:07:45 +09:00
|
|
|
spec:
|
|
|
|
{{- with .Values.imagePullSecrets }}
|
|
|
|
imagePullSecrets:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
2023-08-21 23:14:53 +09:00
|
|
|
serviceAccountName: {{ include "iceshrimp.serviceAccountName" . }}
|
2023-05-11 08:07:45 +09:00
|
|
|
securityContext:
|
|
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
|
|
volumes:
|
2024-01-15 04:36:37 +09:00
|
|
|
- name: config-volume
|
|
|
|
secret:
|
|
|
|
secretName: {{ template "iceshrimp.fullname" . }}-config
|
|
|
|
- name: data-volume
|
|
|
|
{{- if .Values.iceshrimp.localStorage.enabled }}
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: {{ include "iceshrimp.datapvc" . }}
|
|
|
|
{{- else }}
|
|
|
|
emptyDir:
|
|
|
|
{{- end }}
|
2023-05-11 08:07:45 +09: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-17 05:26:11 +09:00
|
|
|
command:
|
2024-01-07 21:51:12 +09:00
|
|
|
- yarn
|
2023-05-17 05:26:11 +09:00
|
|
|
- run
|
2024-01-15 04:36:37 +09:00
|
|
|
- start
|
2023-05-11 08:07:45 +09:00
|
|
|
env:
|
|
|
|
- name: "NODE_ENV"
|
|
|
|
value: "production"
|
|
|
|
volumeMounts:
|
|
|
|
- name: config-volume
|
2023-08-21 23:14:53 +09:00
|
|
|
mountPath: /iceshrimp/.config
|
2024-01-15 04:36:37 +09:00
|
|
|
- name: data-volume
|
|
|
|
mountPath: /iceshrimp/files
|
2023-05-11 08:07:45 +09: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 }}
|