Skip to content

Commit 31ec878

Browse files
committed
Update helm chart
1 parent 09d5056 commit 31ec878

File tree

9 files changed

+105
-48
lines changed

9 files changed

+105
-48
lines changed

operator/deploy/chart/templates/pulsar/statefulset.yaml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,13 @@ spec:
3838
- name: admin
3939
containerPort: 8080
4040
protocol: TCP
41-
env:
42-
- name: PULSAR_GC
43-
value: "-XX:+UseG1GC -XX:MaxGCPauseMillis=10"
4441
resources:
4542
{{- toYaml .Values.pulsar.standalone.resources | nindent 12 }}
43+
{{- if .Values.pulsar.standalone.storage.persistence.enabled }}
4644
volumeMounts:
4745
- name: pulsar-data
4846
mountPath: /pulsar/data
49-
- name: pulsar-logs
50-
mountPath: /pulsar/logs
47+
{{- end }}
5148
livenessProbe:
5249
httpGet:
5350
path: /admin/v2/brokers/health
@@ -64,6 +61,7 @@ spec:
6461
periodSeconds: 10
6562
timeoutSeconds: 3
6663
failureThreshold: 3
64+
{{- if .Values.pulsar.standalone.storage.persistence.enabled }}
6765
volumeClaimTemplates:
6866
- metadata:
6967
name: pulsar-data
@@ -75,14 +73,5 @@ spec:
7573
resources:
7674
requests:
7775
storage: {{ .Values.pulsar.standalone.storage.size }}
78-
- metadata:
79-
name: pulsar-logs
80-
spec:
81-
accessModes: ["ReadWriteOnce"]
82-
{{- if .Values.pulsar.standalone.storage.storageClass }}
83-
storageClassName: {{ .Values.pulsar.standalone.storage.storageClass }}
84-
{{- end }}
85-
resources:
86-
requests:
87-
storage: {{ .Values.pulsar.standalone.storage.size }}
76+
{{- end }}
8877
{{- end }}

operator/deploy/chart/templates/rbac/metrics_auth_role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kind: ClusterRole
44
metadata:
55
labels:
66
{{- include "chart.labels" . | nindent 4 }}
7-
name: operator-metrics-auth-role
7+
name: {{ .Release.Name }}-operator-metrics-auth-role
88
rules:
99
- apiGroups:
1010
- authentication.k8s.io

operator/deploy/chart/templates/rbac/metrics_auth_role_binding.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kind: ClusterRoleBinding
44
metadata:
55
labels:
66
{{- include "chart.labels" . | nindent 4 }}
7-
name: operator-metrics-auth-rolebinding
7+
name: {{ .Release.Name }}-operator-metrics-auth-rolebinding
88
roleRef:
99
apiGroup: rbac.authorization.k8s.io
1010
kind: ClusterRole

operator/deploy/chart/templates/rbac/metrics_reader_role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kind: ClusterRole
44
metadata:
55
labels:
66
{{- include "chart.labels" . | nindent 4 }}
7-
name: operator-metrics-reader
7+
name: {{ .Release.Name }}-operator-metrics-reader
88
rules:
99
- nonResourceURLs:
1010
- "/metrics"

operator/deploy/chart/templates/rbac/role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ kind: ClusterRole
55
metadata:
66
labels:
77
{{- include "chart.labels" . | nindent 4 }}
8-
name: operator-manager-role
8+
name: functionstream-operator-manager-role
99
rules:
1010
- apiGroups:
1111
- apps

operator/deploy/chart/templates/rbac/role_binding.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ kind: ClusterRoleBinding
44
metadata:
55
labels:
66
{{- include "chart.labels" . | nindent 4 }}
7-
name: operator-manager-rolebinding
7+
name: {{ .Release.Name }}-functionstream-operator-manager-rolebinding
88
roleRef:
99
apiGroup: rbac.authorization.k8s.io
1010
kind: ClusterRole
11-
name: operator-manager-role
11+
name: functionstream-operator-manager-role
1212
subjects:
1313
- kind: ServiceAccount
1414
name: {{ .Values.controllerManager.serviceAccountName }}

operator/deploy/chart/values.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ controllerManager:
3939
seccompProfile:
4040
type: RuntimeDefault
4141
terminationGracePeriodSeconds: 10
42-
serviceAccountName: operator-controller-manager
42+
serviceAccountName: functionstream-operator
4343

4444
# [RBAC]: To enable RBAC (Permissions) configurations
4545
rbac:
@@ -92,13 +92,13 @@ pulsar:
9292
repository: apachepulsar/pulsar
9393
tag: "latest"
9494
resources:
95-
limits:
96-
cpu: 1000m
97-
memory: 2Gi
9895
requests:
9996
cpu: 500m
10097
memory: 1Gi
10198
storage:
99+
# Enable persistence for Pulsar data
100+
persistence:
101+
enabled: false
102102
size: 10Gi
103103
storageClass: ""
104104
service:

operator/hack/helm.patch

Lines changed: 89 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ index 0000000..a460cbc
9393
\ No newline at end of file
9494
diff --git a/deploy/chart/templates/pulsar/statefulset.yaml b/deploy/chart/templates/pulsar/statefulset.yaml
9595
new file mode 100644
96-
index 0000000..c9722f5
96+
index 0000000..a7f7ef8
9797
--- /dev/null
9898
+++ b/deploy/chart/templates/pulsar/statefulset.yaml
99-
@@ -0,0 +1,88 @@
99+
@@ -0,0 +1,77 @@
100100
+{{- if .Values.pulsar.standalone.enable }}
101101
+apiVersion: apps/v1
102102
+kind: StatefulSet
@@ -137,16 +137,13 @@ index 0000000..c9722f5
137137
+ - name: admin
138138
+ containerPort: 8080
139139
+ protocol: TCP
140-
+ env:
141-
+ - name: PULSAR_GC
142-
+ value: "-XX:+UseG1GC -XX:MaxGCPauseMillis=10"
143140
+ resources:
144141
+ {{- toYaml .Values.pulsar.standalone.resources | nindent 12 }}
142+
+ {{- if .Values.pulsar.standalone.storage.persistence.enabled }}
145143
+ volumeMounts:
146144
+ - name: pulsar-data
147145
+ mountPath: /pulsar/data
148-
+ - name: pulsar-logs
149-
+ mountPath: /pulsar/logs
146+
+ {{- end }}
150147
+ livenessProbe:
151148
+ httpGet:
152149
+ path: /admin/v2/brokers/health
@@ -163,6 +160,7 @@ index 0000000..c9722f5
163160
+ periodSeconds: 10
164161
+ timeoutSeconds: 3
165162
+ failureThreshold: 3
163+
+ {{- if .Values.pulsar.standalone.storage.persistence.enabled }}
166164
+ volumeClaimTemplates:
167165
+ - metadata:
168166
+ name: pulsar-data
@@ -174,20 +172,81 @@ index 0000000..c9722f5
174172
+ resources:
175173
+ requests:
176174
+ storage: {{ .Values.pulsar.standalone.storage.size }}
177-
+ - metadata:
178-
+ name: pulsar-logs
179-
+ spec:
180-
+ accessModes: ["ReadWriteOnce"]
181-
+ {{- if .Values.pulsar.standalone.storage.storageClass }}
182-
+ storageClassName: {{ .Values.pulsar.standalone.storage.storageClass }}
183-
+ {{- end }}
184-
+ resources:
185-
+ requests:
186-
+ storage: {{ .Values.pulsar.standalone.storage.size }}
175+
+ {{- end }}
187176
+{{- end }}
188177
\ No newline at end of file
178+
diff --git a/dist/chart/templates/rbac/metrics_auth_role.yaml b/deploy/chart/templates/rbac/metrics_auth_role.yaml
179+
index b0c7913..decef92 100755
180+
--- a/dist/chart/templates/rbac/metrics_auth_role.yaml
181+
+++ b/deploy/chart/templates/rbac/metrics_auth_role.yaml
182+
@@ -4,7 +4,7 @@ kind: ClusterRole
183+
metadata:
184+
labels:
185+
{{- include "chart.labels" . | nindent 4 }}
186+
- name: operator-metrics-auth-role
187+
+ name: {{ .Release.Name }}-operator-metrics-auth-role
188+
rules:
189+
- apiGroups:
190+
- authentication.k8s.io
191+
diff --git a/dist/chart/templates/rbac/metrics_auth_role_binding.yaml b/deploy/chart/templates/rbac/metrics_auth_role_binding.yaml
192+
index a13f6a6..0172099 100755
193+
--- a/dist/chart/templates/rbac/metrics_auth_role_binding.yaml
194+
+++ b/deploy/chart/templates/rbac/metrics_auth_role_binding.yaml
195+
@@ -4,7 +4,7 @@ kind: ClusterRoleBinding
196+
metadata:
197+
labels:
198+
{{- include "chart.labels" . | nindent 4 }}
199+
- name: operator-metrics-auth-rolebinding
200+
+ name: {{ .Release.Name }}-operator-metrics-auth-rolebinding
201+
roleRef:
202+
apiGroup: rbac.authorization.k8s.io
203+
kind: ClusterRole
204+
diff --git a/dist/chart/templates/rbac/metrics_reader_role.yaml b/deploy/chart/templates/rbac/metrics_reader_role.yaml
205+
index 1f0a0f5..f5655e7 100755
206+
--- a/dist/chart/templates/rbac/metrics_reader_role.yaml
207+
+++ b/deploy/chart/templates/rbac/metrics_reader_role.yaml
208+
@@ -4,7 +4,7 @@ kind: ClusterRole
209+
metadata:
210+
labels:
211+
{{- include "chart.labels" . | nindent 4 }}
212+
- name: operator-metrics-reader
213+
+ name: {{ .Release.Name }}-operator-metrics-reader
214+
rules:
215+
- nonResourceURLs:
216+
- "/metrics"
217+
diff --git a/dist/chart/templates/rbac/role.yaml b/deploy/chart/templates/rbac/role.yaml
218+
index 3ae0961..a32998a 100755
219+
--- a/dist/chart/templates/rbac/role.yaml
220+
+++ b/deploy/chart/templates/rbac/role.yaml
221+
@@ -5,7 +5,7 @@ kind: ClusterRole
222+
metadata:
223+
labels:
224+
{{- include "chart.labels" . | nindent 4 }}
225+
- name: operator-manager-role
226+
+ name: functionstream-operator-manager-role
227+
rules:
228+
- apiGroups:
229+
- apps
230+
diff --git a/dist/chart/templates/rbac/role_binding.yaml b/deploy/chart/templates/rbac/role_binding.yaml
231+
index a4f2cfa..77c8250 100755
232+
--- a/dist/chart/templates/rbac/role_binding.yaml
233+
+++ b/deploy/chart/templates/rbac/role_binding.yaml
234+
@@ -4,11 +4,11 @@ kind: ClusterRoleBinding
235+
metadata:
236+
labels:
237+
{{- include "chart.labels" . | nindent 4 }}
238+
- name: operator-manager-rolebinding
239+
+ name: {{ .Release.Name }}-functionstream-operator-manager-rolebinding
240+
roleRef:
241+
apiGroup: rbac.authorization.k8s.io
242+
kind: ClusterRole
243+
- name: operator-manager-role
244+
+ name: functionstream-operator-manager-role
245+
subjects:
246+
- kind: ServiceAccount
247+
name: {{ .Values.controllerManager.serviceAccountName }}
189248
diff --git a/dist/chart/values.yaml b/deploy/chart/values.yaml
190-
index 9357643..734155f 100644
249+
index 9357643..4851d3b 100644
191250
--- a/dist/chart/values.yaml
192251
+++ b/deploy/chart/values.yaml
193252
@@ -3,8 +3,9 @@ controllerManager:
@@ -201,6 +260,15 @@ index 9357643..734155f 100644
201260
args:
202261
- "--leader-elect"
203262
- "--metrics-bind-address=:8443"
263+
@@ -38,7 +39,7 @@ controllerManager:
264+
seccompProfile:
265+
type: RuntimeDefault
266+
terminationGracePeriodSeconds: 10
267+
- serviceAccountName: operator-controller-manager
268+
+ serviceAccountName: functionstream-operator
269+
270+
# [RBAC]: To enable RBAC (Permissions) configurations
271+
rbac:
204272
@@ -81,3 +82,31 @@ certmanager:
205273
# [NETWORK POLICIES]: To enable NetworkPolicies set true
206274
networkPolicy:
@@ -215,13 +283,13 @@ index 9357643..734155f 100644
215283
+ repository: apachepulsar/pulsar
216284
+ tag: "latest"
217285
+ resources:
218-
+ limits:
219-
+ cpu: 1000m
220-
+ memory: 2Gi
221286
+ requests:
222287
+ cpu: 500m
223288
+ memory: 1Gi
224289
+ storage:
290+
+ # Enable persistence for Pulsar data
291+
+ persistence:
292+
+ enabled: false
225293
+ size: 10Gi
226294
+ storageClass: ""
227295
+ service:

operator/scripts/install-cert-manager.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ kubectl wait --for=jsonpath='{.status.phase}=Running' pods -l app.kubernetes.io/
3737
echo "cert-manager installation completed successfully!"
3838
echo ""
3939
echo "You can now install the FunctionStream operator:"
40-
echo " helm install fs ./deploy/chart"
40+
echo " helm install fs ./deploy/chart -n fs --create-namespace"
4141
echo ""
4242
echo "Or if you want to install with Pulsar standalone:"
43-
echo " helm install fs ./deploy/chart --set pulsar.standalone.enable=true"
43+
echo " helm install fs ./deploy/chart --set pulsar.standalone.enable=true -n fs --create-namespace"

0 commit comments

Comments
 (0)