Skip to content

Commit 72ab8a7

Browse files
committed
chore(zookeeper): add plans
1 parent dfcd33b commit 72ab8a7

22 files changed

Lines changed: 746 additions & 34 deletions
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
credential:
2+
- name: HOST
3+
valueFrom:
4+
serviceRef:
5+
name: {{ template "common.names.fullname" . }}
6+
jsonpath: '{ .status.loadBalancer.ingress[*].ip }'
7+
8+
{{- if not .Values.service.disableBaseClientPort }}
9+
- name: TCP_CLIENT_PORT
10+
valueFrom:
11+
serviceRef:
12+
name: {{ template "common.names.fullname" . }}
13+
jsonpath: '{ .spec.ports[?(@.name=="tcp-client")].port }'
14+
{{- end }}
15+
16+
{{- if .Values.tls.client.enabled }}
17+
- name: TCP_CLIENTT_TLS_PORT
18+
valueFrom:
19+
serviceRef:
20+
name: {{ template "common.names.fullname" . }}
21+
jsonpath: '{ .spec.ports[?(@.name=="tcp-client-tls")].port }'
22+
{{- end }}
23+
24+
{{- if .Values.auth.client.enabled }}
25+
- name: ZOO_CLIENT_USER
26+
value: {{ .Values.auth.client.clientUser | quote }}
27+
28+
- name: ZOO_SERVER_USERS
29+
value: {{ .Values.auth.client.serverUsers | quote }}
30+
{{- end }}
31+
32+
{{- if (include "zookeeper.client.createSecret" .) }}
33+
- name: CLIENT_PASSWORD
34+
valueFrom:
35+
secretRef:
36+
name: {{ printf "%s-client-auth" (include "common.names.fullname" .) }}
37+
jsonpath: '{ .data.client-password }'
38+
39+
- name: SERVER_PASSWORD
40+
valueFrom:
41+
secretRef:
42+
name: {{ printf "%s-client-auth" (include "common.names.fullname" .) }}
43+
jsonpath: '{ .data.server-password }'
44+
{{- end }}
45+
46+
{{- if .Values.auth.quorum.enabled }}
47+
- name: QUORUM_LEARNER_USER
48+
value: {{ .Values.auth.quorum.learnerUser | quote }}
49+
50+
- name: QUORUM_SERVER_USER
51+
value: {{ .Values.auth.quorum.serverUsers | quote }}
52+
{{- end }}
53+
54+
{{- if (include "zookeeper.quorum.createSecret" .) }}
55+
- name: QUORUM_LEARNER_PASSWORD
56+
valueFrom:
57+
secretRef:
58+
name: {{ printf "%s-quorum-auth" (include "common.names.fullname" .) }}
59+
jsonpath: '{ .data.quorum-learner-password }'
60+
61+
- name: QUORUM_SERVER_PASSWORD
62+
valueFrom:
63+
secretRef:
64+
name: {{ printf "%s-quorum-auth" (include "common.names.fullname" .) }}
65+
jsonpath: '{ .data.quorum-server-password }'
66+
{{- end }}
67+
68+
{{- if (include "zookeeper.client.createTlsPasswordsSecret" .) }}
69+
- name: CLIENT_KEYSTORE_PASSWORD
70+
valueFrom:
71+
secretRef:
72+
name: {{ template "common.names.fullname" . }}-client-tls-pass
73+
jsonpath: '{ .data.keystore-password }'
74+
75+
- name: CLIENT_TRUSTSTORE_PASSWORD
76+
valueFrom:
77+
secretRef:
78+
name: {{ template "common.names.fullname" . }}-client-tls-pass
79+
jsonpath: '{ .data.truststore-password }'
80+
{{- end }}
81+
82+
{{- if (include "zookeeper.quorum.createTlsPasswordsSecret" .) }}
83+
- name: QUORUM_KEYSTORE_PASSWORD
84+
valueFrom:
85+
secretRef:
86+
name: {{ template "common.names.fullname" . }}-quorum-tls-pass
87+
jsonpath: '{ .data.keystore-password }'
88+
89+
- name: QUORUM_TRUSTSTORE_PASSWORD
90+
valueFrom:
91+
secretRef:
92+
name: {{ template "common.names.fullname" . }}-quorum-tls-pass
93+
jsonpath: '{ .data.truststore-password }'
94+
{{- end }}

addons/zookeeper/3.9/plans/standard-512/create-instance-schema.json renamed to addons/zookeeper/3.9/plans/standard-16c32g/create-instance-schema.json

File renamed without changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: "standard-16c32g"
2+
id: b859846e-a724-4bc0-b4aa-d816cc3169cc
3+
description: "ZooKeeper standard-16c32g plan which limit resources 16 cores 32G memory."
4+
displayName: "standard-16c32g"
5+
bindable: true
6+
maximum_polling_duration: 1800
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
## @param fullnameOverride String to fully override common.names.fullname template
2+
##
3+
fullnameOverride: "hb-zookeeper-standard-16c32g"
4+
5+
## @param replicaCount Number of ZooKeeper nodes
6+
##
7+
replicaCount: 3
8+
9+
## ZooKeeper resource requests and limits
10+
## ref: https://kubernetes.io/docs/user-guide/compute-resources/
11+
## @param resources.limits The resources limits for the ZooKeeper containers
12+
## @param resources.requests.memory The requested memory for the ZooKeeper containers
13+
## @param resources.requests.cpu The requested cpu for the ZooKeeper containers
14+
##
15+
resources:
16+
limits:
17+
memory: 32Gi
18+
cpu: 16000m
19+
requests:
20+
memory: 16Gi
21+
cpu: 1600m
22+
## @section Persistence parameters
23+
24+
## Enable persistence using Persistent Volume Claims
25+
## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/
26+
##
27+
persistence:
28+
## @param persistence.enabled Enable ZooKeeper data persistence using PVC. If false, use emptyDir
29+
##
30+
enabled: true
31+
## @param persistence.existingClaim Name of an existing PVC to use (only when deploying a single replica)
32+
##
33+
existingClaim: ""
34+
## @param persistence.storageClass PVC Storage Class for ZooKeeper data volume
35+
## If defined, storageClassName: <storageClass>
36+
## If set to "-", storageClassName: "", which disables dynamic provisioning
37+
## If undefined (the default) or set to null, no storageClassName spec is
38+
## set, choosing the default provisioner. (gp2 on AWS, standard on
39+
## GKE, AWS & OpenStack)
40+
##
41+
storageClass: ""
42+
## @param persistence.accessModes PVC Access modes
43+
##
44+
accessModes:
45+
- ReadWriteOnce
46+
## @param persistence.size PVC Storage Request for ZooKeeper data volume
47+
##
48+
size: 64Gi
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
credential:
2+
- name: HOST
3+
valueFrom:
4+
serviceRef:
5+
name: {{ template "common.names.fullname" . }}
6+
jsonpath: '{ .status.loadBalancer.ingress[*].ip }'
7+
8+
{{- if not .Values.service.disableBaseClientPort }}
9+
- name: TCP_CLIENT_PORT
10+
valueFrom:
11+
serviceRef:
12+
name: {{ template "common.names.fullname" . }}
13+
jsonpath: '{ .spec.ports[?(@.name=="tcp-client")].port }'
14+
{{- end }}
15+
16+
{{- if .Values.tls.client.enabled }}
17+
- name: TCP_CLIENTT_TLS_PORT
18+
valueFrom:
19+
serviceRef:
20+
name: {{ template "common.names.fullname" . }}
21+
jsonpath: '{ .spec.ports[?(@.name=="tcp-client-tls")].port }'
22+
{{- end }}
23+
24+
{{- if .Values.auth.client.enabled }}
25+
- name: ZOO_CLIENT_USER
26+
value: {{ .Values.auth.client.clientUser | quote }}
27+
28+
- name: ZOO_SERVER_USERS
29+
value: {{ .Values.auth.client.serverUsers | quote }}
30+
{{- end }}
31+
32+
{{- if (include "zookeeper.client.createSecret" .) }}
33+
- name: CLIENT_PASSWORD
34+
valueFrom:
35+
secretRef:
36+
name: {{ printf "%s-client-auth" (include "common.names.fullname" .) }}
37+
jsonpath: '{ .data.client-password }'
38+
39+
- name: SERVER_PASSWORD
40+
valueFrom:
41+
secretRef:
42+
name: {{ printf "%s-client-auth" (include "common.names.fullname" .) }}
43+
jsonpath: '{ .data.server-password }'
44+
{{- end }}
45+
46+
{{- if .Values.auth.quorum.enabled }}
47+
- name: QUORUM_LEARNER_USER
48+
value: {{ .Values.auth.quorum.learnerUser | quote }}
49+
50+
- name: QUORUM_SERVER_USER
51+
value: {{ .Values.auth.quorum.serverUsers | quote }}
52+
{{- end }}
53+
54+
{{- if (include "zookeeper.quorum.createSecret" .) }}
55+
- name: QUORUM_LEARNER_PASSWORD
56+
valueFrom:
57+
secretRef:
58+
name: {{ printf "%s-quorum-auth" (include "common.names.fullname" .) }}
59+
jsonpath: '{ .data.quorum-learner-password }'
60+
61+
- name: QUORUM_SERVER_PASSWORD
62+
valueFrom:
63+
secretRef:
64+
name: {{ printf "%s-quorum-auth" (include "common.names.fullname" .) }}
65+
jsonpath: '{ .data.quorum-server-password }'
66+
{{- end }}
67+
68+
{{- if (include "zookeeper.client.createTlsPasswordsSecret" .) }}
69+
- name: CLIENT_KEYSTORE_PASSWORD
70+
valueFrom:
71+
secretRef:
72+
name: {{ template "common.names.fullname" . }}-client-tls-pass
73+
jsonpath: '{ .data.keystore-password }'
74+
75+
- name: CLIENT_TRUSTSTORE_PASSWORD
76+
valueFrom:
77+
secretRef:
78+
name: {{ template "common.names.fullname" . }}-client-tls-pass
79+
jsonpath: '{ .data.truststore-password }'
80+
{{- end }}
81+
82+
{{- if (include "zookeeper.quorum.createTlsPasswordsSecret" .) }}
83+
- name: QUORUM_KEYSTORE_PASSWORD
84+
valueFrom:
85+
secretRef:
86+
name: {{ template "common.names.fullname" . }}-quorum-tls-pass
87+
jsonpath: '{ .data.keystore-password }'
88+
89+
- name: QUORUM_TRUSTSTORE_PASSWORD
90+
valueFrom:
91+
secretRef:
92+
name: {{ template "common.names.fullname" . }}-quorum-tls-pass
93+
jsonpath: '{ .data.truststore-password }'
94+
{{- end }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"type": "object",
4+
"properties": {
5+
"imagePullPolicy": {
6+
"type": "string",
7+
"enum": ["Always", "IfNotPresent", "Never"],
8+
"default": "IfNotPresent",
9+
"title": "Image pull policy"
10+
}
11+
}
12+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: "standard-1c2g"
2+
id: e6b09cde-467f-4f86-9f74-f509464a77cd
3+
description: "ZooKeeper standard-1c2g plan which limit resources 1 core 2G memory."
4+
displayName: "standard-1c2g"
5+
bindable: true
6+
maximum_polling_duration: 1800

addons/zookeeper/3.9/plans/standard-512/values.yaml renamed to addons/zookeeper/3.9/plans/standard-1c2g/values.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## @param fullnameOverride String to fully override common.names.fullname template
22
##
3-
fullnameOverride: "hb-zookeeper-standard-512"
3+
fullnameOverride: "hb-zookeeper-standard-1c2g"
44

55
## @param replicaCount Number of ZooKeeper nodes
66
##
@@ -14,11 +14,11 @@ replicaCount: 3
1414
##
1515
resources:
1616
limits:
17-
memory: 512Mi
18-
cpu: 250m
17+
memory: 2Gi
18+
cpu: 1000m
1919
requests:
20-
memory: 256Mi
21-
cpu: 125m
20+
memory: 1Gi
21+
cpu: 100m
2222
## @section Persistence parameters
2323

2424
## Enable persistence using Persistent Volume Claims
@@ -45,4 +45,4 @@ persistence:
4545
- ReadWriteOnce
4646
## @param persistence.size PVC Storage Request for ZooKeeper data volume
4747
##
48-
size: 512Mi
48+
size: 4Gi
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
credential:
2+
- name: HOST
3+
valueFrom:
4+
serviceRef:
5+
name: {{ template "common.names.fullname" . }}
6+
jsonpath: '{ .status.loadBalancer.ingress[*].ip }'
7+
8+
{{- if not .Values.service.disableBaseClientPort }}
9+
- name: TCP_CLIENT_PORT
10+
valueFrom:
11+
serviceRef:
12+
name: {{ template "common.names.fullname" . }}
13+
jsonpath: '{ .spec.ports[?(@.name=="tcp-client")].port }'
14+
{{- end }}
15+
16+
{{- if .Values.tls.client.enabled }}
17+
- name: TCP_CLIENTT_TLS_PORT
18+
valueFrom:
19+
serviceRef:
20+
name: {{ template "common.names.fullname" . }}
21+
jsonpath: '{ .spec.ports[?(@.name=="tcp-client-tls")].port }'
22+
{{- end }}
23+
24+
{{- if .Values.auth.client.enabled }}
25+
- name: ZOO_CLIENT_USER
26+
value: {{ .Values.auth.client.clientUser | quote }}
27+
28+
- name: ZOO_SERVER_USERS
29+
value: {{ .Values.auth.client.serverUsers | quote }}
30+
{{- end }}
31+
32+
{{- if (include "zookeeper.client.createSecret" .) }}
33+
- name: CLIENT_PASSWORD
34+
valueFrom:
35+
secretRef:
36+
name: {{ printf "%s-client-auth" (include "common.names.fullname" .) }}
37+
jsonpath: '{ .data.client-password }'
38+
39+
- name: SERVER_PASSWORD
40+
valueFrom:
41+
secretRef:
42+
name: {{ printf "%s-client-auth" (include "common.names.fullname" .) }}
43+
jsonpath: '{ .data.server-password }'
44+
{{- end }}
45+
46+
{{- if .Values.auth.quorum.enabled }}
47+
- name: QUORUM_LEARNER_USER
48+
value: {{ .Values.auth.quorum.learnerUser | quote }}
49+
50+
- name: QUORUM_SERVER_USER
51+
value: {{ .Values.auth.quorum.serverUsers | quote }}
52+
{{- end }}
53+
54+
{{- if (include "zookeeper.quorum.createSecret" .) }}
55+
- name: QUORUM_LEARNER_PASSWORD
56+
valueFrom:
57+
secretRef:
58+
name: {{ printf "%s-quorum-auth" (include "common.names.fullname" .) }}
59+
jsonpath: '{ .data.quorum-learner-password }'
60+
61+
- name: QUORUM_SERVER_PASSWORD
62+
valueFrom:
63+
secretRef:
64+
name: {{ printf "%s-quorum-auth" (include "common.names.fullname" .) }}
65+
jsonpath: '{ .data.quorum-server-password }'
66+
{{- end }}
67+
68+
{{- if (include "zookeeper.client.createTlsPasswordsSecret" .) }}
69+
- name: CLIENT_KEYSTORE_PASSWORD
70+
valueFrom:
71+
secretRef:
72+
name: {{ template "common.names.fullname" . }}-client-tls-pass
73+
jsonpath: '{ .data.keystore-password }'
74+
75+
- name: CLIENT_TRUSTSTORE_PASSWORD
76+
valueFrom:
77+
secretRef:
78+
name: {{ template "common.names.fullname" . }}-client-tls-pass
79+
jsonpath: '{ .data.truststore-password }'
80+
{{- end }}
81+
82+
{{- if (include "zookeeper.quorum.createTlsPasswordsSecret" .) }}
83+
- name: QUORUM_KEYSTORE_PASSWORD
84+
valueFrom:
85+
secretRef:
86+
name: {{ template "common.names.fullname" . }}-quorum-tls-pass
87+
jsonpath: '{ .data.keystore-password }'
88+
89+
- name: QUORUM_TRUSTSTORE_PASSWORD
90+
valueFrom:
91+
secretRef:
92+
name: {{ template "common.names.fullname" . }}-quorum-tls-pass
93+
jsonpath: '{ .data.truststore-password }'
94+
{{- end }}

0 commit comments

Comments
 (0)