This is an automated email from the ASF dual-hosted git repository.

jshao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new c55ad35491 [#10557] fix(chart): use start-gravitino.sh instead of 
gravitino.sh to launch the service (#10583)
c55ad35491 is described below

commit c55ad354913b613f7db2c121d7d0d7740e7185ff
Author: Danhua Wang <[email protected]>
AuthorDate: Thu Apr 2 11:09:23 2026 +0800

    [#10557] fix(chart): use start-gravitino.sh instead of gravitino.sh to 
launch the service (#10583)
    
    ### What changes were proposed in this pull request?
    
    Gravitino Chart should use start-gravitino.sh instead of gravitino.sh to
    launch the service
    Lance Chart should use start-lance-rest-server.sh to launch the service
    Iceberg Chart should use start-iceberg-rest-server.sh to launch the
    service
    
    ### Why are the changes needed?
    
    Fix: #10557
    
    ### Does this PR introduce _any_ user-facing change?
    
    N/A
    
    ### How was this patch tested?
    
    Manually test and CI check.
---
 .github/workflows/chart-test.yaml                  | 24 ++++++----------------
 .../templates/deployment.yaml                      | 12 +++++++++--
 .../gravitino-iceberg-rest-server/values.yaml      |  4 +---
 .../templates/deployment.yaml                      | 12 +++++++++--
 dev/charts/gravitino-lance-rest-server/values.yaml |  4 +---
 .../gravitino/resources/scenarios/ci-values.yaml   |  2 --
 .../gravitino/resources/scenarios/pg-values.yaml   |  3 +--
 dev/charts/gravitino/templates/deployment.yaml     |  6 ++++--
 dev/charts/gravitino/values.yaml                   |  4 +---
 dev/docker/gravitino/start-gravitino.sh            |  5 ++++-
 .../start-iceberg-rest-server.sh                   |  5 ++++-
 .../lance-rest-server/start-lance-rest-server.sh   |  5 ++++-
 12 files changed, 46 insertions(+), 40 deletions(-)

diff --git a/.github/workflows/chart-test.yaml 
b/.github/workflows/chart-test.yaml
index 7970fa91a9..1ed227caa3 100644
--- a/.github/workflows/chart-test.yaml
+++ b/.github/workflows/chart-test.yaml
@@ -34,27 +34,15 @@ jobs:
           fetch-depth: 0
 
       - name: Set up Helm
-        uses: azure/[email protected]
+        uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4
 
       - uses: actions/[email protected]
         with:
           python-version: '3.x'
           check-latest: true
 
-      - name: Install yamale
-        run: pip install yamale
-
-      - name: Install yq
-        run: |
-          sudo apt update
-          sudo apt install yq
-
-      - name: Install chart-testing
-        run: |
-          curl -LO 
https://github.com/helm/chart-testing/releases/download/v3.12.0/chart-testing_3.12.0_linux_amd64.tar.gz
-          tar -xzf chart-testing_3.12.0_linux_amd64.tar.gz
-          sudo mv ct /usr/local/bin/
-          ct version
+      - name: Set up chart-testing
+        uses: 
helm/chart-testing-action@6ec842c01de15ebb84c8627d2744a0c2f2755c9f
 
       - name: List changed
         id: list-changed
@@ -79,10 +67,10 @@ jobs:
           registry: true
 
       - name: Set up QEMU
-        uses: docker/setup-qemu-action@v3
+        uses: 
docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
 
       - name: Set up Docker Buildx
-        uses: docker/setup-buildx-action@v3
+        uses: 
docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
 
       - uses: actions/setup-java@v4
         with:
@@ -119,7 +107,7 @@ jobs:
           done
 
       - name: Set up kubectl
-        uses: azure/setup-kubectl@v4
+        uses: azure/setup-kubectl@15650b3ad78fff148532a140b8a4c821796b2d7b
 
       - name: Run chart-testing (install default,gravitino)
         if: steps.list-changed.outputs.changed == 'true'
diff --git a/dev/charts/gravitino-iceberg-rest-server/templates/deployment.yaml 
b/dev/charts/gravitino-iceberg-rest-server/templates/deployment.yaml
index d838c331d8..9cf3fcc170 100644
--- a/dev/charts/gravitino-iceberg-rest-server/templates/deployment.yaml
+++ b/dev/charts/gravitino-iceberg-rest-server/templates/deployment.yaml
@@ -83,9 +83,17 @@ spec:
             {{- toYaml .Values.securityContext | nindent 12 }}
 
           # Environment variables
-          {{- if .Values.env }}
           env:
-            {{- toYaml .Values.env | nindent 12 }}
+            - name: GRAVITINO_HOME
+              value: /root/gravitino-iceberg-rest-server
+            - name: SKIP_CONFIG_REWRITE
+              value: "true"
+          {{- with .Values.env }}
+            {{- toYaml . | nindent 12 }}
+          {{- end }}
+          {{- range $item := .Values.envWithTpl }}
+            - name: {{ $item.name }}
+              value: {{ tpl $item.value $ | quote }}
           {{- end }}
 
           # Environment from ConfigMaps/Secrets
diff --git a/dev/charts/gravitino-iceberg-rest-server/values.yaml 
b/dev/charts/gravitino-iceberg-rest-server/values.yaml
index 273829f59e..2e32521bd2 100644
--- a/dev/charts/gravitino-iceberg-rest-server/values.yaml
+++ b/dev/charts/gravitino-iceberg-rest-server/values.yaml
@@ -259,8 +259,6 @@ securityContext:
 ## Container Environment
 ##
 env:
-  - name: GRAVITINO_HOME
-    value: /root/gravitino-iceberg-rest-server
   - name: GRAVITINO_MEM
     value: "-Xms1024m -Xmx1024m -XX:MaxMetaspaceSize=512m"
 
@@ -281,7 +279,7 @@ initScript: |
   echo "Override config."
   cp /tmp/conf/* ${GRAVITINO_HOME}/conf
   echo "Start the Gravitino Iceberg Rest Catalog Server"
-  /bin/bash ${GRAVITINO_HOME}/bin/gravitino-iceberg-rest-server.sh run
+  /bin/bash ${GRAVITINO_HOME}/bin/start-iceberg-rest-server.sh
 
 ## Readiness probe for the Gravitino deployment
 ##
diff --git a/dev/charts/gravitino-lance-rest-server/templates/deployment.yaml 
b/dev/charts/gravitino-lance-rest-server/templates/deployment.yaml
index d3ae4fb426..a3307041c5 100644
--- a/dev/charts/gravitino-lance-rest-server/templates/deployment.yaml
+++ b/dev/charts/gravitino-lance-rest-server/templates/deployment.yaml
@@ -60,9 +60,17 @@ spec:
             - "/bin/bash"
             - "/tmp/conf/init.sh"
           # Environment variables
-          {{- if .Values.env }}
           env:
-            {{- toYaml .Values.env | nindent 12 }}
+            - name: GRAVITINO_HOME
+              value: /root/gravitino-lance-rest-server
+            - name: SKIP_CONFIG_REWRITE
+              value: "true"
+          {{- with .Values.env }}
+            {{- toYaml . | nindent 12 }}
+          {{- end }}
+          {{- range $item := .Values.envWithTpl }}
+            - name: {{ $item.name }}
+              value: {{ tpl $item.value $ | quote }}
           {{- end }}
           {{- with .Values.envFrom }}
           envFrom:
diff --git a/dev/charts/gravitino-lance-rest-server/values.yaml 
b/dev/charts/gravitino-lance-rest-server/values.yaml
index 912b9825cd..5b4f0ee921 100644
--- a/dev/charts/gravitino-lance-rest-server/values.yaml
+++ b/dev/charts/gravitino-lance-rest-server/values.yaml
@@ -69,7 +69,7 @@ initScript: |
   echo "Override config."
   cp /tmp/conf/* ${GRAVITINO_HOME}/conf
   echo "Start the Gravitino Lance Rest Server"
-  /bin/bash ${GRAVITINO_HOME}/bin/gravitino-lance-rest-server.sh run
+  /bin/bash ${GRAVITINO_HOME}/bin/start-lance-rest-server.sh
 
 ## Optional volumes for logs
 volumes:
@@ -81,8 +81,6 @@ volumeMounts:
     mountPath: /root/gravitino-lance-rest-server/logs
 
 env:
-  - name: GRAVITINO_HOME
-    value: /root/gravitino-lance-rest-server
   - name: GRAVITINO_MEM
     value: "-Xms1024m -Xmx1024m -XX:MaxMetaspaceSize=512m"
 
diff --git a/dev/charts/gravitino/resources/scenarios/ci-values.yaml 
b/dev/charts/gravitino/resources/scenarios/ci-values.yaml
index 9a0ecd4046..ed85e62134 100644
--- a/dev/charts/gravitino/resources/scenarios/ci-values.yaml
+++ b/dev/charts/gravitino/resources/scenarios/ci-values.yaml
@@ -50,8 +50,6 @@ extraVolumes:
 replicas: 2
 
 env:
-  - name: GRAVITINO_HOME
-    value: /root/gravitino
   - name: HADOOP_USER_NAME
     value: hdfs
 
diff --git a/dev/charts/gravitino/resources/scenarios/pg-values.yaml 
b/dev/charts/gravitino/resources/scenarios/pg-values.yaml
index 0321f78c6b..322e3b9827 100644
--- a/dev/charts/gravitino/resources/scenarios/pg-values.yaml
+++ b/dev/charts/gravitino/resources/scenarios/pg-values.yaml
@@ -21,6 +21,5 @@ postgresql:
 
 initScript: |
   cp /tmp/conf/* ${GRAVITINO_HOME}/conf
-  wget https://jdbc.postgresql.org/download/postgresql-42.7.0.jar -O 
/root/gravitino/libs/postgresql-42.7.0.jar
   echo "Start the Gravitino Server"
-  /bin/bash ${GRAVITINO_HOME}/bin/gravitino.sh run
\ No newline at end of file
+  /bin/bash ${GRAVITINO_HOME}/bin/start-gravitino.sh
diff --git a/dev/charts/gravitino/templates/deployment.yaml 
b/dev/charts/gravitino/templates/deployment.yaml
index 624ddde526..b984b5043b 100644
--- a/dev/charts/gravitino/templates/deployment.yaml
+++ b/dev/charts/gravitino/templates/deployment.yaml
@@ -183,8 +183,11 @@ spec:
             {{- toYaml .Values.resources | nindent 12 }}
           securityContext:
             {{- toYaml .Values.containerSecurityContext | nindent 12 }}
-          {{- if or .Values.env .Values.envWithTpl }}
           env:
+            - name: GRAVITINO_HOME
+              value: /root/gravitino
+            - name: SKIP_CONFIG_REWRITE
+              value: "true"
           {{- with .Values.env }}
             {{- toYaml . | nindent 12 }}
           {{- end }}
@@ -192,7 +195,6 @@ spec:
             - name: {{ $item.name }}
               value: {{ tpl $item.value $ | quote }}
           {{- end }}
-          {{- end }}
           {{- if .Values.envFrom }}
           envFrom:
             {{- toYaml .Values.envFrom | nindent 12 }}
diff --git a/dev/charts/gravitino/values.yaml b/dev/charts/gravitino/values.yaml
index 7c7080346c..9da03e490b 100644
--- a/dev/charts/gravitino/values.yaml
+++ b/dev/charts/gravitino/values.yaml
@@ -427,7 +427,7 @@ additionalLog4j2Properties:
 initScript: |
   cp /tmp/conf/* ${GRAVITINO_HOME}/conf
   echo "Start the Gravitino Server"
-  /bin/bash ${GRAVITINO_HOME}/bin/gravitino.sh run
+  /bin/bash ${GRAVITINO_HOME}/bin/start-gravitino.sh
 
 ## Expose the gravitino service to be accessed from outside the cluster 
(LoadBalancer service).
 ## or access it from within the cluster (ClusterIP service). Set the service 
type and the port to serve it.
@@ -514,8 +514,6 @@ containerSecurityContext:
 ## Container Environment
 ##
 env:
-  - name: GRAVITINO_HOME
-    value: /root/gravitino
   - name: GRAVITINO_MEM
     value: "-Xms1024m -Xmx1024m -XX:MaxMetaspaceSize=512m"
 
diff --git a/dev/docker/gravitino/start-gravitino.sh 
b/dev/docker/gravitino/start-gravitino.sh
index 58c07d3790..5d43d54576 100755
--- a/dev/docker/gravitino/start-gravitino.sh
+++ b/dev/docker/gravitino/start-gravitino.sh
@@ -24,7 +24,10 @@ gravitino_dir="$(cd "${bin_dir}/../">/dev/null; pwd)"
 
 cd ${gravitino_dir}
 
-python bin/rewrite_gravitino_server_config.py
+# Skip config rewrite if SKIP_CONFIG_REWRITE is set (e.g., in Kubernetes)
+if [ "${SKIP_CONFIG_REWRITE}" != "true" ]; then
+  python bin/rewrite_gravitino_server_config.py
+fi
 
 # Create soft links for JDBC drivers
 jdbc_driver_dir="${gravitino_dir}/jdbc-drivers"
diff --git a/dev/docker/iceberg-rest-server/start-iceberg-rest-server.sh 
b/dev/docker/iceberg-rest-server/start-iceberg-rest-server.sh
index 6ee6152dc3..9e2e56ad85 100755
--- a/dev/docker/iceberg-rest-server/start-iceberg-rest-server.sh
+++ b/dev/docker/iceberg-rest-server/start-iceberg-rest-server.sh
@@ -24,7 +24,10 @@ iceberg_rest_server_dir="$(cd "${bin_dir}/../">/dev/null; 
pwd)"
 
 cd ${iceberg_rest_server_dir}
 
-python bin/rewrite_config.py
+# Skip config rewrite if SKIP_CONFIG_REWRITE is set (e.g., in Kubernetes)
+if [ "${SKIP_CONFIG_REWRITE}" != "true" ]; then
+  python bin/rewrite_config.py
+fi
 
 JAVA_OPTS+=" -XX:-UseContainerSupport"
 export JAVA_OPTS
diff --git a/dev/docker/lance-rest-server/start-lance-rest-server.sh 
b/dev/docker/lance-rest-server/start-lance-rest-server.sh
index 5d95c5b1ce..58ec285445 100755
--- a/dev/docker/lance-rest-server/start-lance-rest-server.sh
+++ b/dev/docker/lance-rest-server/start-lance-rest-server.sh
@@ -24,7 +24,10 @@ lance_rest_server_dir="$(cd "${bin_dir}/../">/dev/null; pwd)"
 
 cd ${lance_rest_server_dir}
 
-python bin/rewrite_config.py
+# Skip config rewrite if SKIP_CONFIG_REWRITE is set (e.g., in Kubernetes)
+if [ "${SKIP_CONFIG_REWRITE}" != "true" ]; then
+  python bin/rewrite_config.py
+fi
 
 JAVA_OPTS+=" -XX:-UseContainerSupport"
 export JAVA_OPTS

Reply via email to