Newer
Older
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "onlyoffice-documentserver.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "onlyoffice-documentserver.name" . }}
helm.sh/chart: {{ include "onlyoffice-documentserver.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
replicas: {{ .Values.onlyoffice.replicaCount }}
type: {{ .Values.onlyoffice.strategy }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "onlyoffice-documentserver.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "onlyoffice-documentserver.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
lifecycle:
preStop:
exec:
command:
- "documentserver-prepare4shutdown.sh"
image: "{{ .Values.onlyoffice.image.repository }}:{{ .Values.onlyoffice.image.tag }}"
imagePullPolicy: {{ .Values.onlyoffice.image.pullPolicy }}
{{- if .Values.onlyoffice.livenessProbe.enabled }}
livenessProbe:
failureThreshold: 3
httpGet:
initialDelaySeconds: {{ .Values.onlyoffice.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.onlyoffice.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.onlyoffice.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.onlyoffice.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.onlyoffice.livenessProbe.failureThreshold }}
{{- if .Values.onlyoffice.readinessProbe.enabled }}
failureThreshold: 3
httpGet:
path: /welcome
port: http
scheme: HTTP
initialDelaySeconds: {{ .Values.onlyoffice.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.onlyoffice.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.onlyoffice.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.onlyoffice.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.onlyoffice.readinessProbe.failureThreshold }}

Maarten de Waard
committed
value: "amqp://user:{{ .Values.rabbitmq.rabbitmq.password }}@{{ .Release.Name }}-rabbitmq:{{ .Values.rabbitmq.service.port }}"
value: "{{ .Values.onlyoffice.jwtSecret }}"
valueFrom:
secretKeyRef:
name: "{{ .Release.Name }}-postgresql"
key: "postgresql-password"
value: "{{ .Release.Name }}-postgresql"
value: "{{ .Values.postgresql.service.port }}"
value: "{{ .Values.postgresql.postgresqlDatabase }}"
- name: REDIS_SERVER_HOST
value: "{{ .Release.Name }}-redis-master"
- name: REDIS_SERVER_PORT
value: "{{ .Values.redis.master.service.port }}"
- name: SKIP_FONTS_GENERATION
value: "{{ .Values.onlyoffice.skipFontsGeneration }}"
- name: USE_UNAUTHORIZED_STORAGE
value: "{{ .Values.onlyoffice.unauthorizedStorage }}"
- name: ONLYOFFICE_HTTPS_HSTS_ENABLED
value: "{{ .Values.onlyoffice.httpsHstsEnabled }}"
containerPort: {{ .Values.onlyoffice.containerPort }}
- name: spellchecker
containerPort: 8080
protocol: TCP
{{- toYaml .Values.onlyoffice.resources | nindent 12 }}
{{- toYaml .Values.onlyoffice.securityContext | nindent 12 }}
volumeMounts:
- name: onlyoffice-data
mountPath: /var/lib/onlyoffice
volumes:
- name: onlyoffice-data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "onlyoffice-documentserver.fullname" . }}-onlyoffice{{- end }}
{{- else }}
emptyDir: {}
{{- end }}
{{- with .Values.onlyoffice.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.onlyoffice.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.onlyoffice.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}