This is an automated email from the ASF dual-hosted git repository.
jshao pushed a commit to branch branch-1.2
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/branch-1.2 by this push:
new 6b29be5930 [Cherry-pick to branch-1.2] [#10557] fix(chart): use
start-gravitino.sh instead of gravitino.sh to launch the service (#10583)
(#10654)
6b29be5930 is described below
commit 6b29be593011e31a4e09793c602144b7ba4edc19
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Apr 2 19:03:29 2026 +0800
[Cherry-pick to branch-1.2] [#10557] fix(chart): use start-gravitino.sh
instead of gravitino.sh to launch the service (#10583) (#10654)
**Cherry-pick Information:**
- Original commit: c55ad354913b613f7db2c121d7d0d7740e7185ff
- Target branch: `branch-1.2`
- Status: ✅ Clean cherry-pick (no conflicts)
Co-authored-by: Danhua Wang <[email protected]>
---
.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 3884457e38..08b48b3635 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 ab20c916d8..748b29b9c3 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 0401b94aff..133beb8f8c 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 608a9f7395..c34230737f 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
JAVA_OPTS+=" -XX:-UseContainerSupport"
export JAVA_OPTS
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