swuferhong commented on code in PR #1685: URL: https://github.com/apache/fluss/pull/1685#discussion_r2377443521
########## 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. Review Comment: TabletServer ########## 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" Review Comment: 0.8-SNAPSHOT ########## docker/helm/templates/sts-coordinator.yaml: ########## @@ -0,0 +1,77 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: coordinator-server + labels: + {{- include "fluss.labels" . | nindent 4 }} +spec: + serviceName: coordinator-server-hs + 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 + - name: NODE_IP + valueFrom: + fieldRef: + fieldPath: status.hostIP + 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://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 Review Comment: need or not? ########## docker/helm/templates/sts-coordinator.yaml: ########## @@ -0,0 +1,77 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: coordinator-server + labels: + {{- include "fluss.labels" . | nindent 4 }} +spec: + serviceName: coordinator-server-hs + 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 }}" Review Comment: Do we need to add `{{.Values.image.registry}}`, and change this to `{{.Values.image.registry}}/{{.Values.image.repository}}:{{ .Values.image.tag }}` ########## 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 + Review Comment: We need to add more contents in Readme to introduce how to build a fluss cluster and operate by fluss in helm charts ########## 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: Review Comment: Do we need to add `image:registry`? ########## 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 Review Comment: TabletServers ########## docker/helm/templates/sts-tablet.yaml: ########## @@ -0,0 +1,77 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: tablet-server + labels: + {{- include "fluss.labels" . | nindent 4 }} +spec: + serviceName: tablet-server-hs + 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 }}" Review Comment: Ditto. Do we need to add {{.Values.image.registry}}, and change this to {{.Values.image.registry}}/{{.Values.image.repository}}:{{ .Values.image.tag }} ########## docker/helm/templates/sts-tablet.yaml: ########## @@ -0,0 +1,77 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: tablet-server + labels: + {{- include "fluss.labels" . | nindent 4 }} +spec: + serviceName: tablet-server-hs + 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 && \ + 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://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 Review Comment: ditto. Need or not? ########## 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" Review Comment: 0.8-SNAPSHOT -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
