-
Notifications
You must be signed in to change notification settings - Fork 211
/
zookeeper.yaml
168 lines (168 loc) · 5.9 KB
/
zookeeper.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
{{- $storageType := .Values.storageType | default "persistence" -}}
apiVersion: "zookeeper.pravega.io/v1beta1"
kind: "ZookeeperCluster"
metadata:
name: {{ template "zookeeper.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{ include "zookeeper.commonLabels" . | indent 4 }}
spec:
replicas: {{ .Values.replicas }}
image:
repository: {{ .Values.image.repository }}
tag: {{ .Values.image.tag }}
pullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.domainName }}
domainName: {{ .Values.domainName }}
{{- end }}
kubernetesClusterDomain: {{ default "cluster.local" .Values.kubernetesClusterDomain }}
{{- if .Values.probes }}
probes:
{{- if .Values.probes.readiness }}
readinessProbe:
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds | default 10 }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds | default 10 }}
failureThreshold: {{ .Values.probes.readiness.failureThreshold | default 3}}
successThreshold: {{ .Values.probes.readiness.successThreshold | default 1 }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds | default 10}}
{{- end }}
{{- if .Values.probes.liveness }}
livenessProbe:
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds | default 10 }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds | default 10 }}
failureThreshold: {{ .Values.probes.liveness.failureThreshold | default 3 }}
timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds | default 10 }}
{{- end }}
{{- end }}
{{- if .Values.containers }}
containers:
{{ toYaml .Values.containers | indent 4 }}
{{- end }}
{{- if .Values.volumes }}
volumes:
{{ toYaml .Values.volumes | indent 4 }}
{{- end }}
labels:
{{ toYaml .Values.labels | indent 4 }}
ports:
{{ toYaml .Values.ports | indent 4 }}
pod:
{{- if .Values.pod.labels }}
labels:
{{ toYaml .Values.pod.labels | indent 6 }}
{{- end }}
{{- if .Values.pod.nodeSelector }}
nodeSelector:
{{ toYaml .Values.pod.nodeSelector | indent 6 }}
{{- end }}
{{- if .Values.pod.affinity }}
affinity:
{{ toYaml .Values.pod.affinity | indent 6 }}
{{- end }}
{{- if .Values.pod.resources }}
resources:
{{ toYaml .Values.pod.resources | indent 6 }}
{{- end }}
{{- if .Values.pod.tolerations }}
tolerations:
{{ toYaml .Values.pod.tolerations | indent 6 }}
{{- end }}
{{- if .Values.pod.env }}
env:
{{ toYaml .Values.pod.env | indent 6 }}
{{- end }}
{{- if .Values.pod.annotations }}
annotations:
{{ toYaml .Values.pod.annotations | indent 6 }}
{{- end }}
{{- if .Values.pod.securityContext }}
securityContext:
{{ toYaml .Values.pod.securityContext | indent 6 }}
{{- end }}
{{- if .Values.pod.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.pod.terminationGracePeriodSeconds }}
{{- end }}
serviceAccountName: {{ default "zookeeper" .Values.pod.serviceAccountName }}
{{- if .Values.pod.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.pod.imagePullSecrets | indent 6 }}
{{- end }}
{{- if .Values.config }}
config:
{{- if .Values.config.initLimit }}
initLimit: {{ .Values.config.initLimit }}
{{- end }}
{{- if .Values.config.tickTime }}
tickTime: {{ .Values.config.tickTime }}
{{- end }}
{{- if .Values.config.syncLimit }}
syncLimit: {{ .Values.config.syncLimit }}
{{- end }}
{{- if .Values.config.globalOutstandingLimit }}
globalOutstandingLimit: {{ .Values.config.globalOutstandingLimit }}
{{- end }}
{{- if .Values.config.preAllocSize }}
preAllocSize: {{ .Values.config.preAllocSize }}
{{- end }}
{{- if .Values.config.snapCount }}
snapCount: {{ .Values.config.snapCount }}
{{- end }}
{{- if .Values.config.commitLogCount }}
commitLogCount: {{ .Values.config.commitLogCount }}
{{- end }}
{{- if .Values.config.snapSizeLimitInKb }}
snapSizeLimitInKb: {{ .Values.snapSizeLimitInKb }}
{{- end }}
{{- if .Values.config.maxCnxns }}
maxCnxns: {{ .Values.maxCnxns }}
{{- end }}
{{- if .Values.config.maxClientCnxns }}
maxClientCnxns: {{ .Values.maxClientCnxns }}
{{- end }}
{{- if .Values.config.minSessionTimeout }}
minSessionTimeout: {{ .Values.minSessionTimeout }}
{{- end }}
{{- if .Values.config.maxSessionTimeout }}
maxSessionTimeout: {{ .Values.maxSessionTimeout }}
{{- end }}
{{- if .Values.config.autoPurgeSnapRetainCount }}
autoPurgeSnapRetainCount: {{ .Values.autoPurgeSnapRetainCount }}
{{- end }}
{{- if .Values.config.autoPurgePurgeInterval }}
autoPurgePurgeInterval: {{ .Values.config.autoPurgePurgeInterval }}
{{- end }}
{{- if .Values.config.quorumListenOnAllIPs }}
quorumListenOnAllIPs: {{ .Values.config.quorumListenOnAllIPs }}
{{- end }}
{{- end }}
storageType: {{ $storageType }}
{{- if eq $storageType "ephemeral" }}
ephemeral:
{{- if .Values.ephemeral.emptydirvolumesource }}
emptydirvolumesource:
{{- if .Values.ephemeral.emptydirvolumesource.medium }}
medium: {{ .Values.ephemeral.emptydirvolumesource.medium }}
{{- end }}
{{- if .Values.ephemeral.emptydirvolumesource.sizeLimit }}
sizeLimit: {{ .Values.ephemeral.emptydirvolumesource.sizeLimit }}
{{- end }}
{{- end }}
{{- else }}
persistence:
reclaimPolicy: {{ .Values.persistence.reclaimPolicy }}
{{- if .Values.persistence.annotations }}
annotations:
{{ toYaml .Values.persistence.annotations | indent 6 }}
{{- end }}
{{- if or .Values.persistence.storageClassName .Values.persistence.volumeSize }}
spec:
{{- if .Values.persistence.storageClassName }}
storageClassName: {{ .Values.persistence.storageClassName }}
{{- end }}
{{- if .Values.persistence.volumeSize }}
resources:
requests:
storage: {{ .Values.persistence.volumeSize }}
{{- end }}
{{- end }}
{{- end }}