76 lines
2.5 KiB
YAML
76 lines
2.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "seafile.fullname" . }}
|
|
labels:
|
|
{{- include "seafile.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "seafile.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "seafile.labels" . | nindent 8 }}
|
|
spec:
|
|
serviceAccountName: {{ include "seafile.serviceAccountName" . }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
env:
|
|
{{- printf "- name: DB_HOST" | nindent 12 -}}
|
|
{{- if .Values.mariadb.enabled }}
|
|
{{- printf "value: %s-%s" $.Release.Name "mariadb" | nindent 14 -}}
|
|
{{- else }}
|
|
{{- printf "value: %s" .Values.mariadb.serviceDomainName | nindent 14 -}}
|
|
{{- end }}
|
|
{{- toYaml .Values.env | nindent 12 }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: {{ .Values.service.port }}
|
|
protocol: TCP
|
|
livenessProbe:
|
|
failureThreshold: 3
|
|
periodSeconds: 10
|
|
successThreshold: 1
|
|
tcpSocket:
|
|
port: 80
|
|
timeoutSeconds: 1
|
|
initialDelaySeconds: 50
|
|
readinessProbe:
|
|
failureThreshold: 3
|
|
periodSeconds: 30
|
|
successThreshold: 1
|
|
tcpSocket:
|
|
port: 80
|
|
timeoutSeconds: 1
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: "/shared"
|
|
readOnly: false
|
|
{{- if .Values.onlyoffice.enabled }}
|
|
- mountPath: /opt/custom/seahub_settings.py
|
|
name: netdisc-config
|
|
subPath: seahub_settings.py
|
|
- mountPath: /opt/custom/nginx.config
|
|
name: nginx-config
|
|
subPath: nginx.config
|
|
{{- end }}
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: seafile-data
|
|
{{- if .Values.onlyoffice.enabled }}
|
|
- configMap:
|
|
defaultMode: 420
|
|
name: netdisc-config
|
|
name: netdisc-config
|
|
- configMap:
|
|
defaultMode: 420
|
|
name: nginx-config
|
|
name: nginx-config
|
|
{{- end }} |