From 68b2b17a8a9afec00bfd62220c74995340034bc0 Mon Sep 17 00:00:00 2001 From: dreger1997 Date: Thu, 11 Sep 2025 15:11:10 +0200 Subject: [PATCH 01/11] First helm draft with statefulset tablet, coordinator, configmap and svc for coordinator and headless svc for tablet --- docker/helm/.helmignore | 23 +++++++ docker/helm/Chart.yaml | 28 ++++++++ docker/helm/README.md | 13 ++++ docker/helm/templates/_helpers.tpl | 49 ++++++++++++++ docker/helm/templates/configmap.yaml | 11 +++ docker/helm/templates/sts-coordinator.yaml | 73 ++++++++++++++++++++ docker/helm/templates/sts-tablet.yaml | 78 ++++++++++++++++++++++ docker/helm/templates/svc-coordinator.yaml | 17 +++++ docker/helm/templates/svc-tablet.yaml | 19 ++++++ docker/helm/values.yaml | 44 ++++++++++++ 10 files changed, 355 insertions(+) create mode 100644 docker/helm/.helmignore create mode 100644 docker/helm/Chart.yaml create mode 100644 docker/helm/README.md create mode 100644 docker/helm/templates/_helpers.tpl create mode 100644 docker/helm/templates/configmap.yaml create mode 100644 docker/helm/templates/sts-coordinator.yaml create mode 100644 docker/helm/templates/sts-tablet.yaml create mode 100644 docker/helm/templates/svc-coordinator.yaml create mode 100644 docker/helm/templates/svc-tablet.yaml create mode 100644 docker/helm/values.yaml diff --git a/docker/helm/.helmignore b/docker/helm/.helmignore new file mode 100644 index 0000000000..0e8a0eb36f --- /dev/null +++ b/docker/helm/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/docker/helm/Chart.yaml b/docker/helm/Chart.yaml new file mode 100644 index 0000000000..193f400658 --- /dev/null +++ b/docker/helm/Chart.yaml @@ -0,0 +1,28 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +apiVersion: v2 +name: fluss +description: A Helm chart for Kubernetes to deploy Apache Fluss Coordinator and Tablet servers +appVersion: "0.7.0" +type: application +version: 0.1.0 +home: https://fluss.apache.org +icon: https://fluss.apache.org/img/logo/svg/colored_logo.svg +maintainers: + - name: Apache Fluss Community + url: https://github.com/apache/fluss \ No newline at end of file diff --git a/docker/helm/README.md b/docker/helm/README.md new file mode 100644 index 0000000000..81199dffc2 --- /dev/null +++ b/docker/helm/README.md @@ -0,0 +1,13 @@ + +# Fluss Helm Chart + +This chart deploys a Fluss cluster with a Coordinator and a StatefulSet of Tablets. +It requires a Zookeeper ensemble to be running in the same Kubernetes cluster. + + +To start Zookeeper use +helm install zk bitnami/zookeeper \ + --set replicaCount=3 \ + --set auth.enabled=false \ + --set persistence.size=5Gi + diff --git a/docker/helm/templates/_helpers.tpl b/docker/helm/templates/_helpers.tpl new file mode 100644 index 0000000000..ba97faaae1 --- /dev/null +++ b/docker/helm/templates/_helpers.tpl @@ -0,0 +1,49 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "fluss.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +*/}} +{{- define "fluss.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "fluss.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "fluss.labels" -}} +helm.sh/chart: {{ printf "%s-%s" .Chart.Name (.Chart.Version | replace "+" "_") | quote }} +app.kubernetes.io/name: {{ include "fluss.name" . | quote }} +app.kubernetes.io/instance: {{ .Release.Name | quote }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +app.kubernetes.io/managed-by: {{ .Release.Service | quote }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "fluss.selectorLabels" -}} +app.kubernetes.io/name: {{ include "fluss.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + diff --git a/docker/helm/templates/configmap.yaml b/docker/helm/templates/configmap.yaml new file mode 100644 index 0000000000..ab47f1be53 --- /dev/null +++ b/docker/helm/templates/configmap.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: fluss-conf-file + labels: + {{- include "fluss.labels" . | nindent 4 }} +data: + server.yaml: | + {{- range $key, $val := .Values.configurationOverrides }} + {{ $key }}: {{ $val }} + {{- end }} \ No newline at end of file diff --git a/docker/helm/templates/sts-coordinator.yaml b/docker/helm/templates/sts-coordinator.yaml new file mode 100644 index 0000000000..06c84ff9dc --- /dev/null +++ b/docker/helm/templates/sts-coordinator.yaml @@ -0,0 +1,73 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: coordinator-server + labels: + {{- include "fluss.labels" . | nindent 4 }} +spec: + serviceName: coordinator-server + replicas: 1 # can only be 1 for now + selector: + matchLabels: + {{- include "fluss.selectorLabels" . | nindent 6 }} + app.kubernetes.io/component: coordinator + template: + metadata: + labels: + {{- include "fluss.selectorLabels" . | nindent 8 }} + app.kubernetes.io/component: coordinator + spec: + containers: + - name: {{ .Chart.Name }}-coordinator + image: "{{.Values.image.repository}}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + command: + - "/bin/sh" + - "-c" + - | + export FLUSS_SERVER_ID=${POD_NAME##*-} && \ + cp /opt/conf/server.yaml $FLUSS_HOME/conf && \ + + echo "" >> $FLUSS_HOME/conf/server.yaml && \ + echo "tablet-server.id: ${FLUSS_SERVER_ID}" >> $FLUSS_HOME/conf/server.yaml && \ + echo "bind.listeners: INTERNAL://${POD_IP}:{{ .Values.appConfig.internalPort }}, CLIENT://0.0.0.0:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ + echo "advertised.listeners: CLIENT://${POD_IP}:9124, INTERNAL://${POD_IP}:9123" >> $FLUSS_HOME/conf/server.yaml && \ + + bin/coordinator-server.sh start-foreground + # advertised.listeners: CLIENT://$(POD_NAME).fluss-tablet-hs.default.svc.cluster.local:9124 + livenessProbe: + failureThreshold: 100 + timeoutSeconds: 1 + initialDelaySeconds: 10 + periodSeconds: 3 + tcpSocket: + port: {{.Values.appConfig.externalPort}} + readinessProbe: + failureThreshold: 100 + timeoutSeconds: 1 + initialDelaySeconds: 10 + periodSeconds: 3 + tcpSocket: + port: {{.Values.appConfig.externalPort}} + resources: + {{- toYaml .Values.resources.tabletServer | nindent 12 }} + volumeMounts: + - name: fluss-conf + mountPath: /opt/conf + volumes: + - name: fluss-conf + configMap: + name: fluss-conf-file diff --git a/docker/helm/templates/sts-tablet.yaml b/docker/helm/templates/sts-tablet.yaml new file mode 100644 index 0000000000..59805949b6 --- /dev/null +++ b/docker/helm/templates/sts-tablet.yaml @@ -0,0 +1,78 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: tablet-server + labels: + {{- include "fluss.labels" . | nindent 4 }} +spec: + serviceName: tablet-server + replicas: 3 + selector: + matchLabels: + {{- include "fluss.selectorLabels" . | nindent 6 }} + app.kubernetes.io/component: tablet + template: + metadata: + labels: + {{- include "fluss.selectorLabels" . | nindent 8 }} + app.kubernetes.io/component: tablet + spec: + containers: + - name: {{ .Chart.Name }}-tablet + image: "{{.Values.image.repository}}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + command: + - "/bin/sh" + - "-c" + - | + export FLUSS_SERVER_ID=${POD_NAME##*-} && \ + cp /opt/conf/server.yaml $FLUSS_HOME/conf && \ + + echo "" >> $FLUSS_HOME/conf/server.yaml && \ + echo "tablet-server.id: ${FLUSS_SERVER_ID}" >> $FLUSS_HOME/conf/server.yaml && \ + echo "bind.listeners: INTERNAL://${POD_IP}:{{ .Values.appConfig.internalPort }}, CLIENT://0.0.0.0:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ + echo "advertised.listeners: CLIENT://${POD_IP}:9124, INTERNAL://${POD_IP}:9123" >> $FLUSS_HOME/conf/server.yaml && \ + + bin/tablet-server.sh start-foreground + # advertised.listeners: CLIENT://$(POD_NAME).fluss-tablet-hs.default.svc.cluster.local:9124 + livenessProbe: + failureThreshold: 100 + timeoutSeconds: 1 + initialDelaySeconds: 10 + periodSeconds: 3 + tcpSocket: + port: {{.Values.appConfig.externalPort}} + readinessProbe: + failureThreshold: 100 + timeoutSeconds: 1 + initialDelaySeconds: 10 + periodSeconds: 3 + tcpSocket: + port: {{.Values.appConfig.externalPort}} + resources: + {{- toYaml .Values.resources.tabletServer | nindent 12 }} + volumeMounts: + - name: fluss-conf + mountPath: /opt/conf + - name: data + mountPath: /tmp/fluss + + volumes: + - name: data + emptyDir: {} + - name: fluss-conf + configMap: + name: fluss-conf-file \ No newline at end of file diff --git a/docker/helm/templates/svc-coordinator.yaml b/docker/helm/templates/svc-coordinator.yaml new file mode 100644 index 0000000000..ef71466d9e --- /dev/null +++ b/docker/helm/templates/svc-coordinator.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: fluss-coordinator +spec: + ports: + - name: internal + protocol: TCP + port: {{ .Values.appConfig.internalPort }} + targetPort: {{ .Values.appConfig.internalPort }} + - name: client + protocol: TCP + port: {{ .Values.appConfig.externalPort }} + targetPort: {{ .Values.appConfig.externalPort }} + type: ClusterIP + selector: + {{- include "fluss.selectorLabels" . | nindent 4 }} \ No newline at end of file diff --git a/docker/helm/templates/svc-tablet.yaml b/docker/helm/templates/svc-tablet.yaml new file mode 100644 index 0000000000..fb94fc6f3b --- /dev/null +++ b/docker/helm/templates/svc-tablet.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: fluss-tablet-hs +spec: + clusterIP: None + type: ClusterIP + ports: + - name: internal + protocol: TCP + port: {{ .Values.appConfig.internalPort }} + targetPort: {{ .Values.appConfig.internalPort }} + - name: client + protocol: TCP + port: {{ .Values.appConfig.externalPort }} + targetPort: {{ .Values.appConfig.externalPort }} + selector: + {{- include "fluss.selectorLabels" . | nindent 4 }} + app.kubernetes.io/component: tablet \ No newline at end of file diff --git a/docker/helm/values.yaml b/docker/helm/values.yaml new file mode 100644 index 0000000000..801457ae11 --- /dev/null +++ b/docker/helm/values.yaml @@ -0,0 +1,44 @@ +# Default values for fluss. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +image: + repository: fluss/fluss + tag: "0.7.0" + pullPolicy: IfNotPresent + pullSecrets: [] + +appConfig: + internalPort: 9123 + externalPort: 9124 + + +# Fluss server configuration options +configurationOverrides: + default.bucket.number: 3 + default.replication.factor: 3 + zookeeper.path.root: /fluss + zookeeper.address: zk-zookeeper.default.svc.cluster.local:2181 + remote.data.dir: /tmp/fluss/remote-data + data.dir: /tmp/fluss/data + internal.listener.name: INTERNAL + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # coordinatorServer: + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + # tabletServer: + # requests: + # cpu: 100m + # memory: 128Mi + # limits: + # cpu: 100m + # memory: 128Mi \ No newline at end of file From 6b255599f11b0191b310a6963689c13f3fe910c7 Mon Sep 17 00:00:00 2001 From: dreger1997 Date: Thu, 11 Sep 2025 15:26:19 +0200 Subject: [PATCH 02/11] fix coordinator selector --- docker/helm/templates/_helpers.tpl | 3 +-- docker/helm/templates/sts-coordinator.yaml | 2 +- docker/helm/templates/svc-coordinator.yaml | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/helm/templates/_helpers.tpl b/docker/helm/templates/_helpers.tpl index ba97faaae1..54e65ec6d1 100644 --- a/docker/helm/templates/_helpers.tpl +++ b/docker/helm/templates/_helpers.tpl @@ -45,5 +45,4 @@ Selector labels {{- define "fluss.selectorLabels" -}} app.kubernetes.io/name: {{ include "fluss.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - +{{- end }} \ No newline at end of file diff --git a/docker/helm/templates/sts-coordinator.yaml b/docker/helm/templates/sts-coordinator.yaml index 06c84ff9dc..83f8ac698c 100644 --- a/docker/helm/templates/sts-coordinator.yaml +++ b/docker/helm/templates/sts-coordinator.yaml @@ -70,4 +70,4 @@ spec: volumes: - name: fluss-conf configMap: - name: fluss-conf-file + name: fluss-conf-file \ No newline at end of file diff --git a/docker/helm/templates/svc-coordinator.yaml b/docker/helm/templates/svc-coordinator.yaml index ef71466d9e..75264fab62 100644 --- a/docker/helm/templates/svc-coordinator.yaml +++ b/docker/helm/templates/svc-coordinator.yaml @@ -14,4 +14,5 @@ spec: targetPort: {{ .Values.appConfig.externalPort }} type: ClusterIP selector: - {{- include "fluss.selectorLabels" . | nindent 4 }} \ No newline at end of file + {{- include "fluss.selectorLabels" . | nindent 4 }} + app.kubernetes.io/component: coordinator \ No newline at end of file From f73cdc85136913508abdf35f83534408c0ad162c Mon Sep 17 00:00:00 2001 From: dreger1997 Date: Fri, 19 Sep 2025 17:55:09 +0200 Subject: [PATCH 03/11] changed coordinator to headless svc and adapted advertised listeners, tested with Flink inside the cluster --- docker/helm/templates/sts-coordinator.yaml | 12 ++++++++---- docker/helm/templates/sts-tablet.yaml | 7 +++---- docker/helm/templates/svc-coordinator.yaml | 8 ++++++-- docker/helm/templates/svc-tablet.yaml | 5 ++++- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/docker/helm/templates/sts-coordinator.yaml b/docker/helm/templates/sts-coordinator.yaml index 83f8ac698c..afda7fad68 100644 --- a/docker/helm/templates/sts-coordinator.yaml +++ b/docker/helm/templates/sts-coordinator.yaml @@ -5,7 +5,7 @@ metadata: labels: {{- include "fluss.labels" . | nindent 4 }} spec: - serviceName: coordinator-server + serviceName: coordinator-server-hs replicas: 1 # can only be 1 for now selector: matchLabels: @@ -34,6 +34,10 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP command: - "/bin/sh" - "-c" @@ -43,9 +47,9 @@ spec: echo "" >> $FLUSS_HOME/conf/server.yaml && \ echo "tablet-server.id: ${FLUSS_SERVER_ID}" >> $FLUSS_HOME/conf/server.yaml && \ - echo "bind.listeners: INTERNAL://${POD_IP}:{{ .Values.appConfig.internalPort }}, CLIENT://0.0.0.0:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ - echo "advertised.listeners: CLIENT://${POD_IP}:9124, INTERNAL://${POD_IP}:9123" >> $FLUSS_HOME/conf/server.yaml && \ - + echo "bind.listeners: INTERNAL://0.0.0.0:{{ .Values.appConfig.internalPort }}, CLIENT://0.0.0.0:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ + echo "advertised.listeners: CLIENT://coordinator-server-${FLUSS_SERVER_ID}.coordinator-server-hs.default.svc.cluster.local:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ + bin/coordinator-server.sh start-foreground # advertised.listeners: CLIENT://$(POD_NAME).fluss-tablet-hs.default.svc.cluster.local:9124 livenessProbe: diff --git a/docker/helm/templates/sts-tablet.yaml b/docker/helm/templates/sts-tablet.yaml index 59805949b6..c3d7818608 100644 --- a/docker/helm/templates/sts-tablet.yaml +++ b/docker/helm/templates/sts-tablet.yaml @@ -5,7 +5,7 @@ metadata: labels: {{- include "fluss.labels" . | nindent 4 }} spec: - serviceName: tablet-server + serviceName: tablet-server-hs replicas: 3 selector: matchLabels: @@ -40,12 +40,11 @@ spec: - | export FLUSS_SERVER_ID=${POD_NAME##*-} && \ cp /opt/conf/server.yaml $FLUSS_HOME/conf && \ - + export PORT=$((9125 + ${FLUSS_SERVER_ID})) && \ echo "" >> $FLUSS_HOME/conf/server.yaml && \ echo "tablet-server.id: ${FLUSS_SERVER_ID}" >> $FLUSS_HOME/conf/server.yaml && \ echo "bind.listeners: INTERNAL://${POD_IP}:{{ .Values.appConfig.internalPort }}, CLIENT://0.0.0.0:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ - echo "advertised.listeners: CLIENT://${POD_IP}:9124, INTERNAL://${POD_IP}:9123" >> $FLUSS_HOME/conf/server.yaml && \ - + echo "advertised.listeners: CLIENT://tablet-server-${FLUSS_SERVER_ID}.tablet-server-hs.default.svc.cluster.local:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ bin/tablet-server.sh start-foreground # advertised.listeners: CLIENT://$(POD_NAME).fluss-tablet-hs.default.svc.cluster.local:9124 livenessProbe: diff --git a/docker/helm/templates/svc-coordinator.yaml b/docker/helm/templates/svc-coordinator.yaml index 75264fab62..7f9c304765 100644 --- a/docker/helm/templates/svc-coordinator.yaml +++ b/docker/helm/templates/svc-coordinator.yaml @@ -1,8 +1,13 @@ apiVersion: v1 kind: Service metadata: - name: fluss-coordinator + name: coordinator-server-hs + labels: + {{- include "fluss.labels" . | nindent 4 }} + app.kubernetes.io/component: coordinator spec: + clusterIP: None + type: ClusterIP ports: - name: internal protocol: TCP @@ -12,7 +17,6 @@ spec: protocol: TCP port: {{ .Values.appConfig.externalPort }} targetPort: {{ .Values.appConfig.externalPort }} - type: ClusterIP selector: {{- include "fluss.selectorLabels" . | nindent 4 }} app.kubernetes.io/component: coordinator \ No newline at end of file diff --git a/docker/helm/templates/svc-tablet.yaml b/docker/helm/templates/svc-tablet.yaml index fb94fc6f3b..83e8a47f09 100644 --- a/docker/helm/templates/svc-tablet.yaml +++ b/docker/helm/templates/svc-tablet.yaml @@ -1,7 +1,10 @@ apiVersion: v1 kind: Service metadata: - name: fluss-tablet-hs + name: tablet-server-hs + labels: + {{- include "fluss.labels" . | nindent 4 }} + app.kubernetes.io/component: tablet spec: clusterIP: None type: ClusterIP From ff4a29500440217cf7235e8157ee2221e9c6e9e0 Mon Sep 17 00:00:00 2001 From: dreger1997 Date: Thu, 25 Sep 2025 21:25:33 +0200 Subject: [PATCH 04/11] fixed license headers, minor typo fixes and comment cleanup --- docker/helm/Chart.yaml | 19 ++++++++++--------- docker/helm/README.md | 2 +- docker/helm/templates/configmap.yaml | 18 ++++++++++++++++++ docker/helm/templates/sts-coordinator.yaml | 19 ++++++++++++++++++- docker/helm/templates/sts-tablet.yaml | 19 ++++++++++++++++++- docker/helm/templates/svc-coordinator.yaml | 18 ++++++++++++++++++ docker/helm/templates/svc-tablet.yaml | 18 ++++++++++++++++++ docker/helm/values.yaml | 18 ++++++++++++++++++ 8 files changed, 119 insertions(+), 12 deletions(-) diff --git a/docker/helm/Chart.yaml b/docker/helm/Chart.yaml index 193f400658..0fd89790fd 100644 --- a/docker/helm/Chart.yaml +++ b/docker/helm/Chart.yaml @@ -1,23 +1,24 @@ # -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - +# apiVersion: v2 name: fluss -description: A Helm chart for Kubernetes to deploy Apache Fluss Coordinator and Tablet servers +description: A Helm chart for Kubernetes to deploy Apache Fluss CoordinatorServer and TabletServers. appVersion: "0.7.0" type: application version: 0.1.0 diff --git a/docker/helm/README.md b/docker/helm/README.md index 81199dffc2..a9ac744013 100644 --- a/docker/helm/README.md +++ b/docker/helm/README.md @@ -1,7 +1,7 @@ # Fluss Helm Chart -This chart deploys a Fluss cluster with a Coordinator and a StatefulSet of Tablets. +This chart deploys a Fluss cluster with a CoordinatorServer and TabletServer as StatefulSets. It requires a Zookeeper ensemble to be running in the same Kubernetes cluster. diff --git a/docker/helm/templates/configmap.yaml b/docker/helm/templates/configmap.yaml index ab47f1be53..1c0a4187a7 100644 --- a/docker/helm/templates/configmap.yaml +++ b/docker/helm/templates/configmap.yaml @@ -1,3 +1,21 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + apiVersion: v1 kind: ConfigMap metadata: diff --git a/docker/helm/templates/sts-coordinator.yaml b/docker/helm/templates/sts-coordinator.yaml index afda7fad68..ba9efa440b 100644 --- a/docker/helm/templates/sts-coordinator.yaml +++ b/docker/helm/templates/sts-coordinator.yaml @@ -1,3 +1,21 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + apiVersion: apps/v1 kind: StatefulSet metadata: @@ -51,7 +69,6 @@ spec: echo "advertised.listeners: CLIENT://coordinator-server-${FLUSS_SERVER_ID}.coordinator-server-hs.default.svc.cluster.local:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ bin/coordinator-server.sh start-foreground - # advertised.listeners: CLIENT://$(POD_NAME).fluss-tablet-hs.default.svc.cluster.local:9124 livenessProbe: failureThreshold: 100 timeoutSeconds: 1 diff --git a/docker/helm/templates/sts-tablet.yaml b/docker/helm/templates/sts-tablet.yaml index c3d7818608..a543a4695e 100644 --- a/docker/helm/templates/sts-tablet.yaml +++ b/docker/helm/templates/sts-tablet.yaml @@ -1,3 +1,21 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + apiVersion: apps/v1 kind: StatefulSet metadata: @@ -46,7 +64,6 @@ spec: echo "bind.listeners: INTERNAL://${POD_IP}:{{ .Values.appConfig.internalPort }}, CLIENT://0.0.0.0:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ echo "advertised.listeners: CLIENT://tablet-server-${FLUSS_SERVER_ID}.tablet-server-hs.default.svc.cluster.local:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ bin/tablet-server.sh start-foreground - # advertised.listeners: CLIENT://$(POD_NAME).fluss-tablet-hs.default.svc.cluster.local:9124 livenessProbe: failureThreshold: 100 timeoutSeconds: 1 diff --git a/docker/helm/templates/svc-coordinator.yaml b/docker/helm/templates/svc-coordinator.yaml index 7f9c304765..8cc74728fb 100644 --- a/docker/helm/templates/svc-coordinator.yaml +++ b/docker/helm/templates/svc-coordinator.yaml @@ -1,3 +1,21 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + apiVersion: v1 kind: Service metadata: diff --git a/docker/helm/templates/svc-tablet.yaml b/docker/helm/templates/svc-tablet.yaml index 83e8a47f09..ca74b6d80f 100644 --- a/docker/helm/templates/svc-tablet.yaml +++ b/docker/helm/templates/svc-tablet.yaml @@ -1,3 +1,21 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + apiVersion: v1 kind: Service metadata: diff --git a/docker/helm/values.yaml b/docker/helm/values.yaml index 801457ae11..65d84ac8ae 100644 --- a/docker/helm/values.yaml +++ b/docker/helm/values.yaml @@ -1,3 +1,21 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + # Default values for fluss. # This is a YAML-formatted file. # Declare variables to be passed into your templates. From a485be7f7049e2679bf632bf811761873470caa6 Mon Sep 17 00:00:00 2001 From: dreger1997 Date: Thu, 25 Sep 2025 21:30:53 +0200 Subject: [PATCH 05/11] fixed license for helpers.tpl --- docker/helm/templates/_helpers.tpl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docker/helm/templates/_helpers.tpl b/docker/helm/templates/_helpers.tpl index 54e65ec6d1..79ae9d3106 100644 --- a/docker/helm/templates/_helpers.tpl +++ b/docker/helm/templates/_helpers.tpl @@ -1,3 +1,21 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + {{/* Expand the name of the chart. */}} From f0fe4f7c37915046d62465f20d81da556f9cbc35 Mon Sep 17 00:00:00 2001 From: dreger1997 Date: Mon, 29 Sep 2025 12:11:27 +0200 Subject: [PATCH 06/11] minor fix to use dynamic namespace naming in the config of advertised listeners --- docker/helm/templates/sts-coordinator.yaml | 2 +- docker/helm/templates/sts-tablet.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/helm/templates/sts-coordinator.yaml b/docker/helm/templates/sts-coordinator.yaml index ba9efa440b..63cf567c8c 100644 --- a/docker/helm/templates/sts-coordinator.yaml +++ b/docker/helm/templates/sts-coordinator.yaml @@ -66,7 +66,7 @@ spec: echo "" >> $FLUSS_HOME/conf/server.yaml && \ echo "tablet-server.id: ${FLUSS_SERVER_ID}" >> $FLUSS_HOME/conf/server.yaml && \ echo "bind.listeners: INTERNAL://0.0.0.0:{{ .Values.appConfig.internalPort }}, CLIENT://0.0.0.0:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ - echo "advertised.listeners: CLIENT://coordinator-server-${FLUSS_SERVER_ID}.coordinator-server-hs.default.svc.cluster.local:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ + echo "advertised.listeners: CLIENT://coordinator-server-${FLUSS_SERVER_ID}.coordinator-server-hs.${POD_NAMESPACE}.svc.cluster.local:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ bin/coordinator-server.sh start-foreground livenessProbe: diff --git a/docker/helm/templates/sts-tablet.yaml b/docker/helm/templates/sts-tablet.yaml index a543a4695e..d38996190c 100644 --- a/docker/helm/templates/sts-tablet.yaml +++ b/docker/helm/templates/sts-tablet.yaml @@ -62,7 +62,7 @@ spec: echo "" >> $FLUSS_HOME/conf/server.yaml && \ echo "tablet-server.id: ${FLUSS_SERVER_ID}" >> $FLUSS_HOME/conf/server.yaml && \ echo "bind.listeners: INTERNAL://${POD_IP}:{{ .Values.appConfig.internalPort }}, CLIENT://0.0.0.0:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ - echo "advertised.listeners: CLIENT://tablet-server-${FLUSS_SERVER_ID}.tablet-server-hs.default.svc.cluster.local:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ + echo "advertised.listeners: CLIENT://tablet-server-${FLUSS_SERVER_ID}.tablet-server-hs.${POD_NAMESPACE}.svc.cluster.local:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ bin/tablet-server.sh start-foreground livenessProbe: failureThreshold: 100 From d209018fcc85ff5edde35f83ecf38ecf42e5fe87 Mon Sep 17 00:00:00 2001 From: dreger1997 Date: Mon, 29 Sep 2025 16:59:32 +0200 Subject: [PATCH 07/11] added docker.io as registry so people can use other images besides official one --- docker/helm/values.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/helm/values.yaml b/docker/helm/values.yaml index 65d84ac8ae..4326595de2 100644 --- a/docker/helm/values.yaml +++ b/docker/helm/values.yaml @@ -21,6 +21,7 @@ # Declare variables to be passed into your templates. image: + registry: docker.io repository: fluss/fluss tag: "0.7.0" pullPolicy: IfNotPresent From ba2c8771a2abbe7d31c79094d63993ffab2180af Mon Sep 17 00:00:00 2001 From: dreger1997 Date: Mon, 29 Sep 2025 21:29:40 +0200 Subject: [PATCH 08/11] added PVC and README to the helm chart --- docker/helm/README.md | 65 +++++++++++++++++++++- docker/helm/templates/sts-coordinator.yaml | 21 ++++++- docker/helm/templates/sts-tablet.yaml | 24 ++++++-- docker/helm/values.yaml | 7 ++- 4 files changed, 105 insertions(+), 12 deletions(-) diff --git a/docker/helm/README.md b/docker/helm/README.md index a9ac744013..d3aa6cce4f 100644 --- a/docker/helm/README.md +++ b/docker/helm/README.md @@ -1,13 +1,72 @@ # Fluss Helm Chart -This chart deploys a Fluss cluster with a CoordinatorServer and TabletServer as StatefulSets. -It requires a Zookeeper ensemble to be running in the same Kubernetes cluster. +This chart deploys an Apache Fluss cluster on Kubernetes, following Helm best practices. +It requires a Zookeeper ensemble to be running in the same Kubernetes cluster. In future releases, we may add support for an embedded Zookeeper cluster. -To start Zookeeper use +## Requirements + +| component | version | +| ------------------------------------------------------------------------------ | ------- | +| [Docker](https://docs.docker.com/) | v28.3.2 | +| [Minikube](https://minikube.sigs.k8s.io/docs/) | v1.36.0 | +| [Kubernetes](https://kubernetes.io) | v1.25.3 | +| [Helm](https://helm.sh) | v3.18.6 | +| [Apache Fluss](https://fluss.apache.org/docs/) | v0.7.0 | + +A container image for Fluss is available on DockerHub as `fluss/fluss:0.7.0`. You can use it directly or build your own from this repo. + +## Overview + +It creates: +- 1x CoordinatorServer as a StatefulSet with a headless Service (stable per‑pod DNS) +- 3x TabletServers as a StatefulSet with a headless Service (stable per‑pod DNS) +- ConfigMap for server.yaml (CoordinatorServer and TabletServers) to override default Fluss configuration +- Optional PersistentVolumes for data directories + +## Quick start + +1) Default (Zookeeper available in-cluster): + +```bash +helm install fluss ./fluss-helm +``` + +2) ZooKeeper deployment: + +To start Zookeeper use Bitnami’s chart or your own deployment. Example with Bitnami’s chart: + +```bash +helm repo add bitnami https://charts.bitnami.com/bitnami +helm repo update helm install zk bitnami/zookeeper \ --set replicaCount=3 \ --set auth.enabled=false \ --set persistence.size=5Gi +``` + +## Configuration reference + +Important Fluss options surfaced by the chart: +- zookeeper.address: CoordinatorServer and TabletServer point to your ZK ensemble. +- data.dir, remote.data.dir: Local persistent path for data; remote path for snapshots (OSS/HDFS). TabletServers default to a PVC mounted at data.dir. +- bind.listeners: Where the server actually binds. +- advertised.listeners: Externally advertised endpoints for clients and intra‑cluster communication. In K8s, advertise stable names. +- internal.listener.name: Which listener is used for internal communication (defaults to INTERNAL). +- tablet-server.id: Required to be unique per TabletServer. The chart auto‑derives this from the StatefulSet pod ordinal at runtime. + + +### Zookeeper and storage +- zookeeper.address must point to a reachable ensemble. +- data.dir defaults to /tmp/fluss/data; use a PVC if persistence.enabled=true. + +## Resource management + +Set resources with requests/limits as appropriate for production. There are no defaults to make it also run on environments with little resources such as Minikube. +## Troubleshooting +- Image pull errors: + - If using a private registry, configure image.pullSecrets and ensure the image repository/tag are correct. +- Pods not ready: ensure ZooKeeper is reachable and ports 9123 are open. +- Connection failures: check advertised.listeners configuration and DNS resolution within the cluster by using kubectl exec to get a shell in a pod and test connectivity (using nc). \ No newline at end of file diff --git a/docker/helm/templates/sts-coordinator.yaml b/docker/helm/templates/sts-coordinator.yaml index 63cf567c8c..2874065938 100644 --- a/docker/helm/templates/sts-coordinator.yaml +++ b/docker/helm/templates/sts-coordinator.yaml @@ -66,7 +66,7 @@ spec: echo "" >> $FLUSS_HOME/conf/server.yaml && \ echo "tablet-server.id: ${FLUSS_SERVER_ID}" >> $FLUSS_HOME/conf/server.yaml && \ echo "bind.listeners: INTERNAL://0.0.0.0:{{ .Values.appConfig.internalPort }}, CLIENT://0.0.0.0:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ - echo "advertised.listeners: CLIENT://coordinator-server-${FLUSS_SERVER_ID}.coordinator-server-hs.${POD_NAMESPACE}.svc.cluster.local:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ + echo "advertised.listeners: CLIENT://${POD_NAME}.coordinator-server-hs.${POD_NAMESPACE}.svc.cluster.local:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ bin/coordinator-server.sh start-foreground livenessProbe: @@ -88,7 +88,24 @@ spec: volumeMounts: - name: fluss-conf mountPath: /opt/conf + - name: data + mountPath: /tmp/fluss/data volumes: - name: fluss-conf configMap: - name: fluss-conf-file \ No newline at end of file + name: fluss-conf-file + {{- if not .Values.persistence.enabled }} + - name: data + emptyDir: {} + {{- end }} + {{- if .Values.persistence.enabled }} + volumeClaimTemplates: + - metadata: + name: data + spec: + accessModes: [ "ReadWriteOnce" ] + resources: + requests: + storage: {{ .Values.persistence.size }} + storageClassName: {{ .Values.persistence.storageClass }} + {{- end}} \ No newline at end of file diff --git a/docker/helm/templates/sts-tablet.yaml b/docker/helm/templates/sts-tablet.yaml index d38996190c..9871bee19f 100644 --- a/docker/helm/templates/sts-tablet.yaml +++ b/docker/helm/templates/sts-tablet.yaml @@ -62,7 +62,7 @@ spec: echo "" >> $FLUSS_HOME/conf/server.yaml && \ echo "tablet-server.id: ${FLUSS_SERVER_ID}" >> $FLUSS_HOME/conf/server.yaml && \ echo "bind.listeners: INTERNAL://${POD_IP}:{{ .Values.appConfig.internalPort }}, CLIENT://0.0.0.0:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ - echo "advertised.listeners: CLIENT://tablet-server-${FLUSS_SERVER_ID}.tablet-server-hs.${POD_NAMESPACE}.svc.cluster.local:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ + echo "advertised.listeners: CLIENT://${POD_NAME}.tablet-server-hs.${POD_NAMESPACE}.svc.cluster.local:{{ .Values.appConfig.externalPort }}" >> $FLUSS_HOME/conf/server.yaml && \ bin/tablet-server.sh start-foreground livenessProbe: failureThreshold: 100 @@ -84,11 +84,23 @@ spec: - name: fluss-conf mountPath: /opt/conf - name: data - mountPath: /tmp/fluss - + mountPath: /tmp/fluss/data volumes: - - name: data - emptyDir: {} - name: fluss-conf configMap: - name: fluss-conf-file \ No newline at end of file + name: fluss-conf-file + {{- if not .Values.persistence.enabled }} + - name: data + emptyDir: {} + {{- end }} + {{- if .Values.persistence.enabled }} + volumeClaimTemplates: + - metadata: + name: data + spec: + accessModes: [ "ReadWriteOnce" ] + resources: + requests: + storage: {{ .Values.persistence.size }} + storageClassName: {{ .Values.persistence.storageClass }} + {{- end}} \ No newline at end of file diff --git a/docker/helm/values.yaml b/docker/helm/values.yaml index 4326595de2..7db528c75e 100644 --- a/docker/helm/values.yaml +++ b/docker/helm/values.yaml @@ -41,7 +41,12 @@ configurationOverrides: remote.data.dir: /tmp/fluss/remote-data data.dir: /tmp/fluss/data internal.listener.name: INTERNAL - + +persistence: + enabled: false + size: 1Gi + storageClass: "" + resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little From 4e70f34f8bad58ff2252d2e3d11a6f8e8d51cf00 Mon Sep 17 00:00:00 2001 From: dreger1997 Date: Mon, 29 Sep 2025 21:43:03 +0200 Subject: [PATCH 09/11] changed storageClass to null to use default --- docker/helm/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/helm/values.yaml b/docker/helm/values.yaml index 7db528c75e..2b8b59b691 100644 --- a/docker/helm/values.yaml +++ b/docker/helm/values.yaml @@ -45,7 +45,7 @@ configurationOverrides: persistence: enabled: false size: 1Gi - storageClass: "" + storageClass: resources: {} # We usually recommend not to specify default resources and to leave this as a conscious From d4b71cd95aa18cde2ed9a5472794f9a81ef45eea Mon Sep 17 00:00:00 2001 From: dreger1997 Date: Tue, 14 Oct 2025 10:55:02 +0200 Subject: [PATCH 10/11] used helm templating to dynamically set the namespace in zookeeper address --- docker/helm/templates/configmap.yaml | 2 +- docker/helm/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/helm/templates/configmap.yaml b/docker/helm/templates/configmap.yaml index 1c0a4187a7..b0e868c90e 100644 --- a/docker/helm/templates/configmap.yaml +++ b/docker/helm/templates/configmap.yaml @@ -25,5 +25,5 @@ metadata: data: server.yaml: | {{- range $key, $val := .Values.configurationOverrides }} - {{ $key }}: {{ $val }} + {{ $key }}: {{ tpl (printf "%v" $val) $ }} {{- end }} \ No newline at end of file diff --git a/docker/helm/values.yaml b/docker/helm/values.yaml index 2b8b59b691..7ac12e9598 100644 --- a/docker/helm/values.yaml +++ b/docker/helm/values.yaml @@ -37,7 +37,7 @@ configurationOverrides: default.bucket.number: 3 default.replication.factor: 3 zookeeper.path.root: /fluss - zookeeper.address: zk-zookeeper.default.svc.cluster.local:2181 + zookeeper.address: zk-zookeeper.{{ .Release.Namespace }}.svc.cluster.local:2181 remote.data.dir: /tmp/fluss/remote-data data.dir: /tmp/fluss/data internal.listener.name: INTERNAL From d31dbcd87e0a53c74bac0c028db5165ca2af506f Mon Sep 17 00:00:00 2001 From: dreger1997 Date: Thu, 16 Oct 2025 09:48:35 +0200 Subject: [PATCH 11/11] changed versions from 0.7.0 to 0.8-SNAPSHOT and included the Docker build step in the README --- docker/helm/Chart.yaml | 2 +- docker/helm/README.md | 42 ++++++++++++++++++++++++++++++----------- docker/helm/values.yaml | 6 +++--- 3 files changed, 35 insertions(+), 15 deletions(-) diff --git a/docker/helm/Chart.yaml b/docker/helm/Chart.yaml index 0fd89790fd..9394d9beeb 100644 --- a/docker/helm/Chart.yaml +++ b/docker/helm/Chart.yaml @@ -19,7 +19,7 @@ apiVersion: v2 name: fluss description: A Helm chart for Kubernetes to deploy Apache Fluss CoordinatorServer and TabletServers. -appVersion: "0.7.0" +appVersion: "0.8-SNAPSHOT" type: application version: 0.1.0 home: https://fluss.apache.org diff --git a/docker/helm/README.md b/docker/helm/README.md index d3aa6cce4f..d329f2682f 100644 --- a/docker/helm/README.md +++ b/docker/helm/README.md @@ -5,7 +5,7 @@ This chart deploys an Apache Fluss cluster on Kubernetes, following Helm best pr It requires a Zookeeper ensemble to be running in the same Kubernetes cluster. In future releases, we may add support for an embedded Zookeeper cluster. -## Requirements +## Development environment | component | version | | ------------------------------------------------------------------------------ | ------- | @@ -13,9 +13,21 @@ It requires a Zookeeper ensemble to be running in the same Kubernetes cluster. I | [Minikube](https://minikube.sigs.k8s.io/docs/) | v1.36.0 | | [Kubernetes](https://kubernetes.io) | v1.25.3 | | [Helm](https://helm.sh) | v3.18.6 | -| [Apache Fluss](https://fluss.apache.org/docs/) | v0.7.0 | +| [Apache Fluss](https://fluss.apache.org/docs/) | v0.8-SNAPSHOT | -A container image for Fluss is available on DockerHub as `fluss/fluss:0.7.0`. You can use it directly or build your own from this repo. + +## Image requirements + +A container image for Fluss is available on DockerHub as `fluss/fluss`. You can use it directly or build your own from this repo. To use your own image you need to build the project with [Maven](https://fluss.apache.org/community/dev/building/) and build it with Docker. + +The Maven build will create all required artifacts in the `build-target` directory. You need to copy it into the `docker` directory. The Dockerfile in this directory will copy these artifacts into the image. + +In minikube, you can use the local Docker daemon to build the image without pushing it to a registry: + +```bash +eval $(minikube -p minikube docker-env) +docker build -t fluss/fluss:0.8-SNAPSHOT . +``` ## Overview @@ -27,15 +39,9 @@ It creates: ## Quick start -1) Default (Zookeeper available in-cluster): - -```bash -helm install fluss ./fluss-helm -``` +1) ZooKeeper deployment: -2) ZooKeeper deployment: - -To start Zookeeper use Bitnami’s chart or your own deployment. Example with Bitnami’s chart: +To start Zookeeper use Bitnami’s chart or your own deployment. If you have an existing Zookeeper cluster, you can skip this step. Example with Bitnami’s chart: ```bash helm repo add bitnami https://charts.bitnami.com/bitnami @@ -46,6 +52,20 @@ helm install zk bitnami/zookeeper \ --set persistence.size=5Gi ``` +2) Default (Zookeeper available in-cluster): + +```bash +helm install fluss ./fluss-helm +``` +With an optional namespace flag `--namespace ` if you want to install it in a specific namespace. + +This assumes, that Zookeeper is reachable at `zk-zookeeper..svc.cluster.local:2181`. If your Zookeeper address is different, you can override it with: + +```bash +helm install fluss ./fluss-helm \ + --set zookeeper.address= +``` + ## Configuration reference Important Fluss options surfaced by the chart: diff --git a/docker/helm/values.yaml b/docker/helm/values.yaml index 7ac12e9598..baa4dac25c 100644 --- a/docker/helm/values.yaml +++ b/docker/helm/values.yaml @@ -21,9 +21,9 @@ # Declare variables to be passed into your templates. image: - registry: docker.io - repository: fluss/fluss - tag: "0.7.0" + registry: "" + repository: fluss + tag: "0.8-SNAPSHOT" pullPolicy: IfNotPresent pullSecrets: []