RexXiong commented on code in PR #2499:
URL: https://github.com/apache/celeborn/pull/2499#discussion_r1597331792


##########
charts/celeborn/README.md:
##########
@@ -17,19 +17,20 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-# Helm Chart for Apache Celeborn
+# celeborn
 
-[Apache Celeborn](https://celeborn.apache.org) is an intermediate data service 
for Big Data compute engines (i.e. ETL, OLAP and Streaming engines) to boost 
performance, stability, and flexibility. Intermediate data typically include 
shuffle and spilled data.
+![Version: 
0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square)
 ![Type: 
application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
 ![AppVersion: 
0.4.0](https://img.shields.io/badge/AppVersion-0.4.0-informational?style=flat-square)
 
+Celeborn is dedicated to improving the efficiency and elasticity of different 
map-reduce engines. Celeborn provides an elastic and high efficient management 
service for shuffle data.

Review Comment:
   Better keep this, and the content here should be consistent with the content 
on the Celeborn website see [Apache Celeborn](https://celeborn.apache.org/)



##########
charts/celeborn/templates/worker/statefulset.yaml:
##########
@@ -0,0 +1,149 @@
+{{- /*
+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:
+  name: {{ include "celeborn.workerStatefulSetName" . }}
+  labels:
+    {{- include "celeborn.labels" . | nindent 4 }}
+    app.kubernetes.io/role: worker
+spec:
+  serviceName: {{ include "celeborn.workerServiceName" . }}
+  selector:
+    matchLabels:
+      {{- include "celeborn.selectorLabels" . | nindent 6 }}
+      app.kubernetes.io/role: worker
+  template:
+    metadata:
+      labels:
+        {{- include "celeborn.selectorLabels" . | nindent 8 }}
+        app.kubernetes.io/role: worker
+        app.kubernetes.io/tag: {{ .Values.image.tag | quote }}
+      {{- with .Values.podAnnotations }}
+      annotations:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+    spec:
+      initContainers:
+      {{- $dirs := .Values.volumes.worker }}
+      {{- if eq "hostPath" (index $dirs 0).type }}
+      - name: chown-{{ $.Release.Name }}-worker-volume
+        image: alpine:3.18
+        {{- with .Values.image.pullPolicy }}
+        imagePullPolicy: {{ . }}
+        {{- end }}
+        command:
+        - chown
+        - {{ .Values.securityContext.runAsUser | default 10006 }}:{{ 
.Values.securityContext.runAsGroup | default 10006 }}
+        {{- range $dir := $dirs }}
+        - {{ $dir.mountPath }}
+        {{- end}}
+        volumeMounts:
+        {{- range $index, $dir := $dirs }}
+        - name: {{ $.Release.Name }}-worker-vol-{{ $index }}
+          mountPath: {{ $dir.mountPath }}
+        {{- end}}
+        {{- with .Values.resources.worker }}
+        resources:
+          {{- toYaml . | nindent 10 }}
+        {{- end }}
+        securityContext:
+          runAsUser: 0
+      {{- end }}
+      containers:
+      - name: {{ .Chart.Name }}
+        image: {{ include "celeborn.image" . }}
+        {{- with .Values.image.pullPolicy }}
+        imagePullPolicy: {{ . }}
+        {{- end }}
+        command:
+        - /usr/bin/tini
+        - --
+        - /bin/sh
+        - -c
+        {{- $namespace := .Release.Namespace }}
+        - "until {{ range until (.Values.masterReplicas |int) }}nslookup {{ 
$.Release.Name }}-master-{{ . }}.{{ $.Release.Name }}-master-svc.{{ $namespace 
}}.svc.{{ $.Values.cluster.name }}.local && {{ end }}true; do echo waiting for 
master; sleep 2; done && exec /opt/celeborn/sbin/start-worker.sh"
+        ports:
+        - containerPort: {{ get .Values.celeborn "celeborn.worker.http.port" | 
default 9096 }}
+          name: metrics
+          protocol: TCP
+        env:
+        {{- range $key, $val := .Values.environments }}
+        - name: {{ $key }}
+          value: {{ $val | quote }}
+        {{- end}}
+        volumeMounts:
+        - mountPath: /opt/celeborn/conf
+          name: {{ include "celeborn.fullname" . }}-volume
+          readOnly: true
+        {{- range $index, $volume := .Values.volumes.worker }}
+        - name: {{ $.Release.Name }}-worker-vol-{{ $index }}
+          mountPath: {{ .mountPath }}
+        {{- end }}
+        {{- with .Values.resources.worker }}
+        resources:
+          {{- toYaml . | nindent 10 }}
+        {{- end }}
+      {{- with .Values.image.pullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      volumes:
+      - name: {{ include "celeborn.fullname" . }}-volume
+        configMap:
+          name: {{ include "celeborn.configMapName" . }}
+      {{- range $index, $volume := .Values.volumes.worker }}
+      - name: {{ $.Release.Name }}-worker-vol-{{ $index }}
+      {{- if eq "emptyDir" $volume.type }}
+        emptyDir:
+          sizeLimit: {{ $volume.capacity }}
+      {{- else if eq "hostPath" $volume.type }}
+        hostPath:
+          path: {{ $volume.hostPath | default $volume.mountPath }}/worker
+          type: DirectoryOrCreate
+      {{- else }}
+      {{ fail "Currently, Celeborn chart only supports 'emptyDir' and 
'hostPath' volume types" }}
+      {{- end }}
+      {{- end }}
+      {{- with .Values.nodeSelector }}
+      nodeSelector:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      {{- with .Values.tolerations }}
+      tolerations:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      {{- with .Values.affinity.worker }}
+      affinity:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      {{- if or .Values.priorityClass.worker.name 
.Values.priorityClass.worker.create }}
+      priorityClassName: {{ .Values.priorityClass.worker.name | default 
(include "celeborn.masterPriorityClassName" .) }}

Review Comment:
   "celeborn.workerPriorityClassName"



##########
charts/celeborn/README.md:
##########
@@ -40,17 +41,57 @@ When you want to test the template rendering, but not 
actually install anything.
 There are two ways to render templates. It will return the rendered template 
to you so you can see the output.
 
 - Local rendering chart templates
+ 
 ```shell
 helm template --debug ../celeborn
 ```
+
 - Server side rendering chart templates
+
 ```shell
 helm install --dry-run --debug --generate-name ../celeborn
 ```
-More details in [Helm Install](https://helm.sh/docs/helm/helm_install/)
-The chart can be customized using the following [celeborn 
configurations](https://celeborn.apache.org/docs/latest/configuration/#important-configurations)
-Specify parameters using `--set key=value[,key=value]` argument to `helm 
install`
+
+More details in [Helm Install](https://helm.sh/docs/helm/helm_install/).
+The chart can be customized using the following [celeborn 
configurations](https://celeborn.apache.org/docs/latest/configuration/#important-configurations).
+Specify parameters using `--set key=value[,key=value]` argument to `helm 
install`.
 
 ## Documentation
 
-For additional details on deploying the Celeborn Kubernetes Helm chart, please 
refer to the [Celeborn on 
Kubernetes](https://celeborn.apache.org/docs/latest/deploy_on_k8s/) 
documentation
+For additional details on deploying the Celeborn Kubernetes Helm chart, please 
refer to the [Celeborn on 
Kubernetes](https://celeborn.apache.org/docs/latest/deploy_on_k8s/) 
documentation.
+
+## Values
+
+| Key | Type | Default | Description |
+|-----|------|---------|-------------|
+| affinity | object | `{}` | Pod affinity |
+| cluster.name | string | `"cluster"` |  |
+| dnsPolicy | string | `"ClusterFirst"` | Specifies the DNS policy for 
Celeborn pods to use |
+| fullnameOverride | string | `""` | String to override the default generated 
fullname |
+| hostNetwork | bool | `false` | Specifies whether to use the host's network 
namespace |
+| image.pullPolicy | string | `"Always"` | Image pull policy |
+| image.repository | string | `"aliyunemr/remote-shuffle-service"` | Image 
repository |
+| image.tag | string | `"0.1.1-6badd20"` | Image tag |
+| imagePullSecrets | list | `[]` | Image pull secrets for private image 
registry |
+| masterReplicas | int | `3` | Specifies the number of Celeborn master 
replicas to deploy, master replicas should not less than 3 |

Review Comment:
   Why the key is still masterReplicas? 



##########
charts/celeborn/templates/master/statefulset.yaml:
##########
@@ -0,0 +1,146 @@
+{{- /*
+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:
+  name: {{ include "celeborn.masterStatefulSetName" . }}
+  labels:
+    {{- include "celeborn.labels" . | nindent 4 }}
+    app.kubernetes.io/role: master
+spec:
+  serviceName: {{ include "celeborn.masterServiceName" . }}
+  selector:
+    matchLabels:
+      {{- include "celeborn.selectorLabels" . | nindent 6 }}
+      app.kubernetes.io/role: master
+  template:
+    metadata:
+      labels:
+        {{- include "celeborn.selectorLabels" . | nindent 8 }}
+        app.kubernetes.io/role: master
+        app.kubernetes.io/tag: {{ .Values.image.tag | quote }}
+      {{- with .Values.podAnnotations }}
+      annotations:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+    spec:
+      initContainers:
+      {{- $dirs := .Values.volumes.master }}
+      {{- if eq "hostPath" (index $dirs 0).type }}
+      - name: chown-{{ $.Release.Name }}-master-volume
+        image: alpine:3.18
+        {{- with .Values.image.pullPolicy }}
+        imagePullPolicy: {{ . }}
+        {{- end }}
+        command:
+        - chown
+        - {{ .Values.securityContext.runAsUser | default 10006 }}:{{ 
.Values.securityContext.runAsGroup | default 10006 }}
+        - {{ (index $dirs 0).mountPath }}
+        volumeMounts:
+        - name: {{ $.Release.Name }}-master-vol-0
+          mountPath: {{ (index $dirs 0).mountPath }}
+        {{- with .Values.resources.master }}
+        resources:
+          {{- toYaml . | nindent 10 }}
+        {{- end }}
+        securityContext:
+          runAsUser: 0
+      {{- end }}
+      containers:
+      - name: {{ .Chart.Name }}
+        image: {{ include "celeborn.image" . }}
+        {{- with .Values.image.pullPolicy }}
+        imagePullPolicy: {{ . }}
+        {{- end }}
+        command:
+        - /usr/bin/tini
+        - --
+        - /bin/sh
+        - -c
+        {{- $namespace := .Release.Namespace }}
+        - "until {{ range until (.Values.masterReplicas |int) }}nslookup {{ 
$.Release.Name }}-master-{{ . }}.{{ $.Release.Name }}-master-svc.{{ $namespace 
}}.svc.{{ $.Values.cluster.name }}.local && {{ end }}true; do echo waiting for 
master; sleep 2; done && exec /opt/celeborn/sbin/start-master.sh"
+        ports:
+        - containerPort: {{ .Values.service.port }}
+        - containerPort: {{ get .Values.celeborn "celeborn.master.http.port" | 
default 9098 }}
+          name: metrics
+          protocol: TCP
+        env:
+        {{- range $key, $val := .Values.environments }}
+        - name: {{ $key }}
+          value: {{ $val | quote }}
+        {{- end}}
+        volumeMounts:
+        - name: {{ include "celeborn.fullname" . }}-volume
+          mountPath: /opt/celeborn/conf
+          readOnly: true
+        {{- range $index, $volume := .Values.volumes.master }}
+        - name: {{ $.Release.Name }}-master-vol-{{ $index }}
+          mountPath: {{ .mountPath }}
+        {{- end }}
+        {{- with .Values.resources.master }}
+        resources:
+          {{- toYaml . | nindent 10 }}
+        {{- end }}
+      {{- with .Values.image.pullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      volumes:
+      - name: {{ include "celeborn.fullname" . }}-volume
+        configMap:
+          name: {{ include "celeborn.configMapName" . }}
+      {{- range $index, $volume := .Values.volumes.master }}
+      - name: {{ $.Release.Name }}-master-vol-{{ $index }}
+      {{- if eq "emptyDir" $volume.type }}
+        emptyDir:
+          sizeLimit: {{ $volume.capacity }}
+      {{- else if eq "hostPath" $volume.type }}
+        hostPath:
+          path: {{ $volume.hostPath | default $volume.mountPath }}/master
+          type: DirectoryOrCreate
+      {{- else }}
+      {{ fail "For now Celeborn Helm only support emptyDir or hostPath volume 
types" }}
+      {{- end }}
+      {{- end }}
+      {{- with .Values.nodeSelector }}
+      nodeSelector:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      {{- with .Values.tolerations }}
+      tolerations:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      {{- with .Values.affinity.master }}
+      affinity:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      {{- if or .Values.priorityClass.master.name 
.Values.priorityClass.master.create }}
+      priorityClassName: {{ .Values.priorityClass.master.name | default 
(include "celeborn.workerPriorityClassName" .) }}

Review Comment:
   include "celeborn.masterPriorityClassName"



##########
charts/celeborn/README.md:
##########
@@ -40,17 +41,57 @@ When you want to test the template rendering, but not 
actually install anything.
 There are two ways to render templates. It will return the rendered template 
to you so you can see the output.
 
 - Local rendering chart templates
+ 
 ```shell
 helm template --debug ../celeborn
 ```
+
 - Server side rendering chart templates
+
 ```shell
 helm install --dry-run --debug --generate-name ../celeborn
 ```
-More details in [Helm Install](https://helm.sh/docs/helm/helm_install/)
-The chart can be customized using the following [celeborn 
configurations](https://celeborn.apache.org/docs/latest/configuration/#important-configurations)
-Specify parameters using `--set key=value[,key=value]` argument to `helm 
install`
+
+More details in [Helm Install](https://helm.sh/docs/helm/helm_install/).
+The chart can be customized using the following [celeborn 
configurations](https://celeborn.apache.org/docs/latest/configuration/#important-configurations).
+Specify parameters using `--set key=value[,key=value]` argument to `helm 
install`.
 
 ## Documentation
 
-For additional details on deploying the Celeborn Kubernetes Helm chart, please 
refer to the [Celeborn on 
Kubernetes](https://celeborn.apache.org/docs/latest/deploy_on_k8s/) 
documentation
+For additional details on deploying the Celeborn Kubernetes Helm chart, please 
refer to the [Celeborn on 
Kubernetes](https://celeborn.apache.org/docs/latest/deploy_on_k8s/) 
documentation.
+
+## Values
+
+| Key | Type | Default | Description |
+|-----|------|---------|-------------|
+| affinity | object | `{}` | Pod affinity |
+| cluster.name | string | `"cluster"` |  |
+| dnsPolicy | string | `"ClusterFirst"` | Specifies the DNS policy for 
Celeborn pods to use |
+| fullnameOverride | string | `""` | String to override the default generated 
fullname |
+| hostNetwork | bool | `false` | Specifies whether to use the host's network 
namespace |
+| image.pullPolicy | string | `"Always"` | Image pull policy |
+| image.repository | string | `"aliyunemr/remote-shuffle-service"` | Image 
repository |
+| image.tag | string | `"0.1.1-6badd20"` | Image tag |
+| imagePullSecrets | list | `[]` | Image pull secrets for private image 
registry |
+| masterReplicas | int | `3` | Specifies the number of Celeborn master 
replicas to deploy, master replicas should not less than 3 |
+| nameOverride | string | `""` | String to override the default generated name 
|
+| nodeSelector | object | `{}` | Pod node selector |
+| podAnnotations | object | `{}` | Pod annotations |
+| podMonitor.enable | bool | `true` | Specifies whether a PodMonitor should be 
created |
+| podMonitor.podMetricsEndpoint | object | 
`{"interval":"5s","portName":"metrics","scheme":"http"}` | Specifies PodMonitor 
endpoint |
+| priorityClass.master.create | bool | `false` | Specifies whether a new 
priority class for Celeborn master pods should be created |
+| priorityClass.master.name | string | `""` | Specifies the name of priority 
class for Celeborn master pods to be used (created if `create: true`) |
+| priorityClass.master.value | int | `1000000000` | Specifies the integer 
value of this priority class, default is half of system-cluster-critical |
+| priorityClass.worker.create | bool | `false` | Specifies whether a new 
priority class for Celeborn worker pods should be created |
+| priorityClass.worker.name | string | `""` | Specifies the name of priority 
class for Celeborn worker pods to be used (created if `create: true`) |
+| priorityClass.worker.value | int | `999999000` | Specifies the integer value 
of this priority class, default is Celeborn master value minus 1000 |
+| resources.master | string | `nil` | Celeborn master pod resources |
+| resources.worker | object | `{}` | Celeborn worker pod resources |
+| securityContext.fsGroup | int | `10006` | Specifies the group ID to use when 
modifying ownership and permissions of the mounted volumes |
+| securityContext.runAsGroup | int | `10006` | Specifies the group ID to run 
the entrypoint of the container process |
+| securityContext.runAsUser | int | `10006` | Specifies the user ID to run the 
entrypoint of the container process |
+| service.port | int | `9097` | Specifies service port |
+| service.type | string | `"ClusterIP"` | Specifies service type |
+| tolerations | list | `[]` | Pod tolerations |
+| volumes | object | `{}` | Specifies Celeborn volumes. Current Celeborn 
support followings volume types are `emptyDir` and `hostPath`. <br> Note that 
`hostPath` only works in hostPath type using to set `volumes hostPath path`. 
Celeborn Master will pick first volumes for store raft log. <br> `diskType` 
only works in Celeborn Worker with hostPath type to manifest local disk type |
+| workerReplicas | int | `5` | Specifies the number of Celeborn worker 
replicas to deploy, should less than node number |

Review Comment:
   ditto.



-- 
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]

Reply via email to