This repository has been archived by the owner on Aug 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
/
statefulset.yaml
114 lines (114 loc) · 3.68 KB
/
statefulset.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ tpl .Values.global.zeebe . | quote }}
labels:
app.kubernetes.io/name: {{ include "zeebe-cluster.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app: {{ tpl .Values.global.zeebe . | quote }}
{{- toYaml .Values.labels | nindent 4 }}
annotations:
{{- range $key, $value := .Values.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
replicas: {{ .Values.clusterSize }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "zeebe-cluster.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app: {{ tpl .Values.global.zeebe . | quote }}
serviceName: {{ tpl .Values.global.zeebe . | quote }}
updateStrategy:
type: RollingUpdate
podManagementPolicy: Parallel
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "zeebe-cluster.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app: {{ tpl .Values.global.zeebe . | quote }}
annotations:
{{- range $key, $value := .Values.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
initContainers:
{{- if .Values.extraInitContainers }}
{{ tpl .Values.extraInitContainers . | indent 8 | trim }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: ZEEBE_LOG_LEVEL
value: debug
- name: ZEEBE_PARTITIONS_COUNT
value: {{ .Values.partitionCount | quote }}
- name: ZEEBE_CLUSTER_SIZE
value: {{ .Values.clusterSize | quote }}
- name: ZEEBE_REPLICATION_FACTOR
value: {{ .Values.replicationFactor | quote }}
- name: JAVA_TOOL_OPTIONS
value:
{{- toYaml .Values.JavaOpts | nindent 12}}
ports:
- containerPort: 9600
name: http
- containerPort: 26500
name: gateway
- containerPort: 26501
name: command
- containerPort: 26502
name: internal
readinessProbe:
httpGet:
path: {{ .Values.probePath }}
port: {{ .Values.service.http.port }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: config
mountPath: /usr/local/zeebe/conf/zeebe.cfg.toml
subPath: zeebe.cfg.toml
- name: config
mountPath: /usr/local/bin/startup.sh
subPath: startup.sh
- name: data
mountPath: /usr/local/zeebe/data
- name: exporters
mountPath: /exporters/
volumes:
- name: config
configMap:
name: {{ tpl .Values.global.zeebe . | quote }}
defaultMode: 0744
- name: exporters
emptyDir: {}
securityContext:
{{ toYaml .Values.podSecurityContext | indent 8 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: {{ .Values.pvcAccessModes }}
storageClassName: {{ .Values.pvcStorageClassName }}
resources:
requests:
storage: {{ .Values.pvcSize | quote }}