mirror of
https://github.com/zulip/docker-zulip.git
synced 2025-11-02 04:53:38 +00:00
A helm chart is added for the installation of Zulip into Kubernetes clusters. The chart is based on a version of PR #287, but contains significant changes. The chart depends on Bitnami helm charts for the installation of Memcached, Postgresql, Rabbitmq and Redis. The chart includes the possibility to add `postSetup` scripts which are mounted to `/data/post-setup.d` and executed by the docker-zulip Docker container. More information can be found in the chart's README in kubernetes/chart/zulip/README.md
105 lines
4.0 KiB
YAML
105 lines
4.0 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: {{ include "zulip.fullname" . }}
|
|
labels:
|
|
{{- include "zulip.labels" . | nindent 4 }}
|
|
{{- if .Values.statefulSetLabels }}
|
|
{{- toYaml .Values.statefulSetLabels | nindent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.statefulSetAnnotations }}
|
|
annotations:
|
|
{{- toYaml .Values.statefulSetAnnotations | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
{{- include "zulip.selectorLabels" . | nindent 6 }}
|
|
serviceName: {{ include "zulip.fullname" . }}
|
|
template:
|
|
metadata:
|
|
{{- with .Values.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "zulip.selectorLabels" . | nindent 8 }}
|
|
{{- if .Values.podLabels }}
|
|
{{- toYaml .Values.podLabels | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "zulip.serviceAccountName" . }}
|
|
securityContext:
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 80
|
|
protocol: TCP
|
|
volumeMounts:
|
|
- name: {{ include "zulip.fullname" . }}-persistent-storage
|
|
mountPath: /data
|
|
- name: {{ include "zulip.fullname" . }}-post-setup-scripts
|
|
mountPath: /data/post-setup.d
|
|
env:
|
|
{{ include "zulip.env" . | nindent 12 }}
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
{{- if .Values.livenessProbe.enabled }}
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
httpHeaders:
|
|
- name: Host
|
|
value: {{ .Values.zulip.environment.SETTING_EXTERNAL_HOST | quote }}
|
|
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
|
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
|
|
successThreshold: {{ .Values.livenessProbe.successThreshold }}
|
|
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
|
{{- end }}
|
|
{{- if .Values.startupProbe.enabled }}
|
|
startupProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
httpHeaders:
|
|
- name: Host
|
|
value: {{ .Values.zulip.environment.SETTING_EXTERNAL_HOST | quote }}
|
|
initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ .Values.startupProbe.periodSeconds }}
|
|
timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }}
|
|
successThreshold: {{ .Values.startupProbe.successThreshold }}
|
|
failureThreshold: {{ .Values.startupProbe.failureThreshold }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: {{ include "zulip.fullname" . }}-persistent-storage
|
|
persistentVolumeClaim:
|
|
claimName: {{ if .Values.zulip.persistence.existingClaim }}{{ .Values.zulip.persistence.existingClaim }}{{- else }}{{ template "zulip.fullname" . }}-data{{- end }}
|
|
- name: {{ include "zulip.fullname" . }}-post-setup-scripts
|
|
configMap:
|
|
name: {{ include "zulip.fullname" . }}-post-setup-scripts
|
|
defaultMode: 0750
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|