Skip to content

Commit dc034a8

Browse files
authored
Initial Dekaf UI support (#637)
1 parent e9f7f1d commit dc034a8

File tree

9 files changed

+339
-0
lines changed

9 files changed

+339
-0
lines changed

.ci/auth/keycloak/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,15 @@ extraVolumeMounts:
3232
- name: realm-config
3333
mountPath: "/opt/bitnami/keycloak/data/import"
3434
readOnly: true
35+
36+
# Fix for https://github.com/bitnami/charts/issues/35164
37+
global:
38+
security:
39+
allowInsecureImages: true
40+
image:
41+
repository: bitnamilegacy/keycloak
42+
tag: 26.2.3-debian-12-r0
43+
postgresql:
44+
image:
45+
repository: bitnamilegacy/postgresql
46+
tag: 17.4.0-debian-12-r17

.ci/clusters/values-dekaf.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
20+
components:
21+
dekaf: true
22+
dekaf:
23+
persistence:
24+
enabled: false

.github/workflows/pulsar-helm-chart-ci.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ jobs:
224224
- name: ZK & BK TLS Only
225225
values_file: .ci/clusters/values-zkbk-tls.yaml
226226
shortname: zkbk-tls
227+
- name: Dekaf
228+
values_file: .ci/clusters/values-dekaf.yaml
229+
shortname: dekaf
227230
- name: Pulsar Manager
228231
values_file: .ci/clusters/values-pulsar-manager.yaml
229232
shortname: pulsar-manager

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,32 @@ zookeeper:
325325

326326
This is shown in some [examples/values-disable-monitoring.yaml](examples/values-disable-monitoring.yaml).
327327

328+
## Dekaf UI
329+
330+
[Dekaf](github.com/visortelle/dekaf) is a new open-source UI for Apache Pulsar.
331+
332+
> :warning: At this moment Dekaf doesn't have built-in authentication. In order to prevent unwanted access, it relies on authentication on the Pulsar broker side.
333+
> If your Pulsar instance stores sensitive data, make sure that:
334+
> - You have configured authentication on the Pulsar side
335+
> - Dekaf isn't accessible from the Internet
336+
> - Only authorized persons have access to you Kubernetes namespace
337+
> Improvements in this area are planned to be implemented later.
338+
339+
To enable the Dekaf component:
340+
341+
- Set the `components.dekaf` property to `true` in the Helm release `values.yaml` file.
342+
- Run the following command to make Dekaf service accessible on your local machine.
343+
344+
```
345+
kubectl port-forward svc/$(kubectl get svc -l component=dekaf -o jsonpath='{.items[0].metadata.name}') 8090:8090
346+
```
347+
348+
- Open <http://localhost:8090> in browser.
349+
328350
## Pulsar Manager
329351

352+
> :warning: Pulsar Manager has been poorly maintained for a long time. Consider the Dekaf UI instead.
353+
330354
The Pulsar Manager can be deployed alongside the pulsar cluster instance.
331355
Depending on the given settings it uses an existing Secret within the given namespace or creates a new one, with random
332356
passwords for both, the UI and the internal database.

charts/pulsar/templates/_dekaf.tpl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{{/*
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
*/}}
19+
20+
{{- define "dekaf.component" -}}
21+
{{ (.Values.dekaf).component | default "dekaf" }}
22+
{{- end }}
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
20+
{{- if .Values.components.dekaf }}
21+
apiVersion: apps/v1
22+
kind: Deployment
23+
metadata:
24+
name: {{ template "pulsar.fullname" . }}-{{ template "dekaf.component" . }}
25+
namespace: {{ template "pulsar.namespace" . }}
26+
labels:
27+
{{- include "pulsar.standardLabels" . | nindent 4 }}
28+
component: {{ template "dekaf.component" . }}
29+
annotations:
30+
{{- toYaml (((.Values.dekaf).deployment).annotations | default dict) | nindent 4 }}
31+
spec:
32+
replicas: 1
33+
selector:
34+
matchLabels:
35+
{{- include "pulsar.matchLabels" . | nindent 6 }}
36+
component: {{ template "dekaf.component" . }}
37+
strategy:
38+
type: Recreate
39+
template:
40+
metadata:
41+
labels:
42+
{{- include "pulsar.template.labels" . | nindent 8 }}
43+
component: {{ template "dekaf.component" . }}
44+
annotations: {{ ((.Values.dekaf).deployment).podAnnotations | default dict | toYaml | nindent 8 }}
45+
spec:
46+
{{- if ((.Values.dekaf).deployment).nodeSelector }}
47+
nodeSelector:
48+
{{ toYaml .Values.dekaf.deployment.nodeSelector | default dict | indent 10 }}
49+
{{- end }}
50+
51+
{{- if ((.Values.dekaf).deployment).tolerations }}
52+
tolerations:
53+
{{ toYaml .Values.dekaf.deployment.tolerations | default list | indent 8 }}
54+
{{- end }}
55+
56+
containers:
57+
- name: dekaf
58+
image: "{{ .Values.images.dekaf.repository }}:{{ .Values.images.dekaf.tag }}"
59+
imagePullPolicy: "{{ template "pulsar.imagePullPolicy" (dict "image" .Values.images.dekaf "root" .) }}"
60+
env:
61+
- name: DEKAF_PULSAR_WEB_URL
62+
value: "http://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}:{{ .Values.broker.ports.http }}"
63+
- name: DEKAF_PULSAR_BROKER_URL
64+
value: "pulsar://{{ template "pulsar.fullname" . }}-{{ .Values.broker.component }}:{{ .Values.broker.ports.pulsar }}"
65+
66+
{{- if ((.Values.dekaf).deployment).extraEnv }}
67+
{{- toYaml .Values.dekaf.deployment.extraEnv | default list | nindent 10 }}
68+
{{- end }}
69+
70+
ports:
71+
- containerPort: 8090
72+
name: http
73+
74+
{{- if ((.Values.dekaf).deployment).resources }}
75+
resources:
76+
{{- toYaml .Values.dekaf.deployment.resources | nindent 12 }}
77+
{{- end }}
78+
79+
{{- if ((.Values.dekaf).deployment).livenessProbe }}
80+
livenessProbe:
81+
{{- toYaml .Values.dekaf.deployment.livenessProbe | nindent 12 }}
82+
{{- end }}
83+
84+
{{- if ((.Values.dekaf).deployment).readinessProbe }}
85+
readinessProbe:
86+
{{- toYaml .Values.dekaf.deployment.readinessProbe | nindent 12 }}
87+
{{- end }}
88+
89+
{{- if ((.Values.dekaf).persistence).enabled }}
90+
volumeMounts:
91+
- name: {{ template "pulsar.fullname" . }}-{{ template "dekaf.component" . }}-library
92+
mountPath: /dekaf/data/library
93+
{{- end }}
94+
95+
{{- if ((.Values.dekaf).deployment).extraVolumeMounts }}
96+
{{- toYaml .Values.dekaf.deployment.extraVolumeMounts | default list | nindent 12 }}
97+
{{- end }}
98+
99+
{{- range ((.Values.dekaf).deployment).extraContainers | default (list) }}
100+
- {{- toYaml . | nindent 10 }}
101+
{{- end }}
102+
103+
volumes:
104+
{{- if ((.Values.dekaf).persistence).enabled }}
105+
- name: {{ template "pulsar.fullname" . }}-{{ template "dekaf.component" . }}-library
106+
persistentVolumeClaim:
107+
claimName: {{ template "pulsar.fullname" . }}-{{ template "dekaf.component" . }}-library
108+
{{- end }}
109+
110+
{{- if ((.Values.dekaf).deployment).extraVolumes }}
111+
{{- toYaml .Values.dekaf.deployment.extraVolumes | default list | nindent 8 }}
112+
{{- end }}
113+
{{- end }}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
20+
{{- if .Values.components.dekaf }}
21+
{{- if ((.Values.dekaf).persistence).enabled }}
22+
apiVersion: v1
23+
kind: PersistentVolumeClaim
24+
metadata:
25+
name: {{ template "pulsar.fullname" . }}-{{ template "dekaf.component" . }}-library
26+
namespace: {{ template "pulsar.namespace" . }}
27+
28+
{{- with ((.Values.dekaf).persistence).annotations }}
29+
annotations:
30+
{{- toYaml . | nindent 4 }}
31+
{{- end }}
32+
33+
labels:
34+
{{- include "pulsar.standardLabels" . | nindent 4 }}
35+
{{- if ((.Values.dekaf).persistence).labels }}
36+
{{- toYaml .Values.dekaf.persistence.labels | nindent 4 }}
37+
{{- end }}
38+
39+
spec:
40+
accessModes:
41+
{{- (((.Values.dekaf).persistence).accessModes | default (list "ReadWriteOnce")) | toYaml | nindent 4 }}
42+
resources:
43+
requests:
44+
storage: "{{ ((.Values.dekaf).persistence).size | default "2Gi" }}"
45+
storageClassName: {{ ((.Values.dekaf).persistence).storageClass | default nil }}
46+
{{- end }}
47+
{{- end }}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
20+
{{- if .Values.components.dekaf }}
21+
apiVersion: v1
22+
kind: Service
23+
metadata:
24+
name: {{ template "pulsar.fullname" . }}-{{ template "dekaf.component" . }}
25+
namespace: {{ template "pulsar.namespace" . }}
26+
labels:
27+
{{- include "pulsar.standardLabels" . | nindent 4 }}
28+
component: {{ template "dekaf.component" . }}
29+
annotations:
30+
{{- if ((.Values.dekaf).service).annotations }}
31+
{{ toYaml .Values.dekaf.service.annotations | indent 4 }}
32+
{{- end }}
33+
spec:
34+
ports:
35+
- name: http
36+
port: 8090
37+
targetPort: 8090
38+
selector:
39+
{{- include "pulsar.matchLabels" . | nindent 4 }}
40+
component: {{ template "dekaf.component" . }}
41+
{{- end }}

charts/pulsar/values.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ components:
135135
toolset: true
136136
# pulsar manager
137137
pulsar_manager: false
138+
# dekaf UI
139+
dekaf: false
138140

139141
# default image repository for pulsar images
140142
defaultPulsarImageRepository: apachepulsar/pulsar-all
@@ -208,6 +210,11 @@ images:
208210
# uses defaultPullPolicy when unspecified
209211
pullPolicy:
210212
hasCommand: false
213+
dekaf:
214+
repository: visortelle/dekaf
215+
tag: 1.0.0
216+
# uses defaultPullPolicy when unspecified
217+
pullPolicy:
211218
oxia:
212219
repository: oxia/oxia
213220
tag: 0.14.4
@@ -1807,6 +1814,7 @@ victoria-metrics-k8s-stack:
18071814
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
18081815
insecureSkipVerify: true # For development environments like minikube
18091816

1817+
## Pulsar Manager has been poorly maintained for a long time. Consider the Dekaf UI instead.
18101818
## Components Stack: pulsar_manager
18111819
## templates/pulsar-manager.yaml
18121820
##
@@ -1911,6 +1919,51 @@ pulsar_manager:
19111919
db_username: "pulsar"
19121920
db_password: "" # leave empty for random password
19131921

1922+
# Dekaf is an open-source web-based UI for Apache Pulsar https://pulsar.apache.org/docs/next/administration-dekaf-ui/
1923+
dekaf:
1924+
component: dekaf
1925+
deployment:
1926+
annotations: {}
1927+
podAnnotations: {}
1928+
nodeSelector: {}
1929+
tolerations: []
1930+
extraVolumes: []
1931+
extraVolumeMounts: []
1932+
extraContainers: []
1933+
extraEnv: []
1934+
resources:
1935+
requests:
1936+
memory: "768Mi"
1937+
cpu: "100m"
1938+
limits:
1939+
memory: "4096Mi"
1940+
cpu: "4000m"
1941+
livenessProbe:
1942+
httpGet:
1943+
path: /health
1944+
port: http
1945+
scheme: HTTP
1946+
periodSeconds: 5
1947+
initialDelaySeconds: 5
1948+
readinessProbe:
1949+
httpGet:
1950+
path: /health
1951+
port: http
1952+
scheme: HTTP
1953+
periodSeconds: 5
1954+
service:
1955+
annotations: {}
1956+
port: 8090
1957+
persistence:
1958+
enabled: true
1959+
# Storage class must be specified, otherwise you can get an error on Helm upgrade
1960+
storageClass: null
1961+
size: 2Gi
1962+
labels: {}
1963+
annotations: {}
1964+
accessModes:
1965+
- ReadWriteOnce
1966+
19141967
# These are jobs where job ttl configuration is used
19151968
# pulsar-helm-chart/charts/pulsar/templates/pulsar-cluster-initialize.yaml
19161969
# pulsar-helm-chart/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml

0 commit comments

Comments
 (0)