-
Notifications
You must be signed in to change notification settings - Fork 204
/
zookeeper.yaml
170 lines (170 loc) · 5.67 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
169
170
{{- $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 }}
{{- if .Values.maxUnavailableReplicas }}
maxUnavailableReplicas: {{ .Values.maxUnavailableReplicas }}
{{- end }}
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 }}
{{- if .Values.volumeMounts }}
volumeMounts:
{{ toYaml .Values.volumeMounts | indent 4 }}
{{- end }}
{{- if .Values.initContainers }}
initContainers:
{{ toYaml .Values.initContainers| indent 4 }}
{{- end }}
{{- if .Values.labels }}
labels:
{{ toYaml .Values.labels | indent 4 }}
{{- end }}
{{- if .Values.ports }}
ports:
{{ toYaml .Values.ports | indent 4 }}
{{- end }}
{{- if .Values.triggerRollingRestart }}
triggerRollingRestart: {{ .Values.triggerRollingRestart }}
{{- end }}
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.topologySpreadConstraints }}
topologySpreadConstraints:
{{ toYaml .Values.pod.topologySpreadConstraints | 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.clientService }}
clientService:
{{- if .Values.clientService.annotations }}
annotations:
{{ toYaml .Values.clientService.annotations | indent 6 }}
{{- end }}
{{- end }}
{{- if .Values.headlessService }}
headlessService:
{{- if .Values.headlessService.annotations }}
annotations:
{{ toYaml .Values.headlessService.annotations | indent 6 }}
{{- end }}
{{- end }}
{{- if .Values.adminServerService }}
adminServerService:
{{- if .Values.adminServerService.annotations }}
annotations:
{{ toYaml .Values.adminServerService.annotations | indent 6 }}
{{- end }}
{{- if .Values.adminServerService.external }}
external: {{ .Values.adminServerService.external }}
{{- end }}
{{- end }}
{{- if .Values.config }}
config:
{{- toYaml .Values.config | nindent 4 }}
{{- 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 }}