This is an automated email from the ASF dual-hosted git repository.
yuqi4733 pushed a commit to branch branch-1.1
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/branch-1.1 by this push:
new 4c5d3cfdf0 [#9403]Add complete Lance REST server Helm chart and
documentation (#9632)
4c5d3cfdf0 is described below
commit 4c5d3cfdf0cf04d3d18dcfcbb741a945c404aee7
Author: Danhua Wang <[email protected]>
AuthorDate: Fri Jan 9 13:18:33 2026 +0800
[#9403]Add complete Lance REST server Helm chart and documentation (#9632)
### What changes were proposed in this pull request?
This PR adds a complete Helm chart for deploying Apache Gravitino Lance
REST Catalog Server on Kubernetes, along with comprehensive
documentation and supporting infrastructure:
1. **Helm Chart Implementation**
([dev/charts/gravitino-lance-rest-server/](dev/charts/gravitino-lance-rest-server/)):
- Complete chart structure with templates, values, and configuration
- Kubernetes deployment, service, and ConfigMap templates
- Production-ready health check configuration with proper timeouts
- Support for custom resource limits, volumes, and environment variables
2. **Documentation**
([docs/lance-rest-catalog-chart.md](docs/lance-rest-catalog-chart.md)):
- Installation prerequisites and setup instructions
- Deployment examples (default and custom configurations)
- Gravitino backend integration requirements
3. **CI Improvement**
([.github/workflows/chart-test.yaml](.github/workflows/chart-test.yaml)):
- Enable local registry for the testing image saving.
- Build gravitino, gravitino-iceberg-rest, gravitino-lance-rest testing
image and push to local registry.
- Pull image from the local registry (kind-registry:5000) when testing
chart.
### Why are the changes needed?
Fix: #9403
### Does this PR introduce _any_ user-facing change?
Yes, this PR introduces significant user-facing changes:
1. **New Helm Chart**: Users can now deploy Lance REST server using:
```bash
helm upgrade --install gravitino ./gravitino-lance-rest-server \
-n gravitino \
--create-namespace \
--set image.tag=1.1.0 \
--set lanceRest.gravitinoUri=http://gravitino:8090 \
--set lanceRest.gravitinoMetalake=my_metalake
### How was this patch tested?
1. Helm Chart Validation:
```
helm dependency update ./gravitino-lance-rest-server
helm lint ./gravitino-lance-rest-server
helm template ./gravitino-lance-rest-server
```
2. Deployment Testing:
Deployed to Kubernetes 1.29+ cluster
Verified pod startup and health check success
3. Chart CI
---
.github/workflows/chart-test.yaml | 77 ++++++-
dev/charts/gravitino-lance-rest-server/.helmignore | 42 ++++
dev/charts/gravitino-lance-rest-server/Chart.yaml | 48 +++++
.../gravitino-lance-rest-log4j2.properties | 56 +++++
.../resources/gravitino-lance-rest-server.conf | 49 +++++
.../templates/NOTES.txt | 41 ++++
.../templates/_helpers.tpl | 88 ++++++++
.../templates/configmap.yaml | 17 +-
.../templates/deployment.yaml | 105 +++++++++
.../templates/ingress.yaml | 80 +++++++
.../templates/poddisruptionbudget.yaml | 50 +++++
.../templates/service.yaml} | 25 +--
.../templates/serviceaccount.yaml} | 23 +-
.../templates/tests/test-connection.yaml | 64 ++++++
dev/charts/gravitino-lance-rest-server/values.yaml | 184 ++++++++++++++++
.../gravitino/resources/config/gravitino.conf | 2 +-
dev/charts/gravitino/templates/configmap.yaml | 2 +-
dev/charts/gravitino/templates/deployment.yaml | 238 ++++++++++-----------
dev/release/release-tag.sh | 53 +++--
docs/lance-rest-server-chart.md | 99 +++++++++
20 files changed, 1169 insertions(+), 174 deletions(-)
diff --git a/.github/workflows/chart-test.yaml
b/.github/workflows/chart-test.yaml
index 2dfd9a946f..7970fa91a9 100644
--- a/.github/workflows/chart-test.yaml
+++ b/.github/workflows/chart-test.yaml
@@ -29,8 +29,7 @@ jobs:
if: needs.changes.outputs.source_changes == 'true'
runs-on: ubuntu-latest
steps:
- - name: Checkout
- uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
fetch-depth: 0
@@ -45,6 +44,11 @@ jobs:
- 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
@@ -72,18 +76,75 @@ jobs:
with:
version: v0.27.0
cluster_name: helm-test-cluster
+ registry: true
+
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v3
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+
+ - uses: actions/setup-java@v4
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+
+ - name: Extract Image Tag
+ id: get-tag
+ run: |
+ # Use yq to parse the value. Path typically follows .image.tag
structure.
+ IMAGE_TAG=$(yq '.image.tag' dev/charts/gravitino/values.yaml)
+
+ # Remove any potential quotes and save to GitHub Outputs
+ echo "tag=$(echo $IMAGE_TAG | tr -d '\"')" >> "$GITHUB_ENV"
+
+ - name: Build the Docker image to local registry
+ if: steps.list-changed.outputs.changed == 'true'
+ run: |
+ sudo rm -rf /usr/local/lib/android
+ sudo rm -rf /opt/hostedtoolcache/CodeQL
+ docker buildx use default
+ rm -rf ${{ github.workspace }}/README.md
+ rm -rf ${{ github.workspace }}/etc
+ rm -rf ${{ github.workspace }}/dev/charts/gravitino/Chart.lock
+ for t in gravitino:gravitino
iceberg-rest-server:gravitino-iceberg-rest
lance-rest-server:gravitino-lance-rest; do
+ (
+ REPO_NAME=${t#*:}
+ FOLDER_NAME=${t%:*}
+ CONTEXT_DIR="${{ github.workspace }}/dev/docker/${FOLDER_NAME}/"
+ . ${CONTEXT_DIR}/${FOLDER_NAME}-dependency.sh
+ docker build -t ${KIND_REGISTRY}/${REPO_NAME}:${tag}
"${CONTEXT_DIR}"
+ docker push ${KIND_REGISTRY}/${REPO_NAME}:${tag}
+ )
+ done
- name: Set up kubectl
uses: azure/setup-kubectl@v4
- - name: Run chart-testing (install default)
+ - name: Run chart-testing (install default,gravitino)
+ if: steps.list-changed.outputs.changed == 'true'
+ run: ct install --charts dev/charts/gravitino --target-branch ${{
github.event.pull_request.base.ref }} --helm-extra-set-args "--set
image.registry="" --set image.repository=${KIND_REGISTRY}/gravitino"
+
+ - name: Run chart-testing (install default,gravitino-iceberg-rest-server)
+ if: steps.list-changed.outputs.changed == 'true'
+ run: ct install --charts dev/charts/gravitino-iceberg-rest-server
--target-branch ${{ github.event.pull_request.base.ref }} --helm-extra-set-args
"--set image.registry="" --set
image.repository=${KIND_REGISTRY}/gravitino-iceberg-rest"
+
+ - name: Run chart-testing (install gravitino with mysql enable,replicas
2)
if: steps.list-changed.outputs.changed == 'true'
- run: ct install --chart-dirs=dev/charts --target-branch ${{
github.event.pull_request.base.ref }}
+ run: ct install --charts=dev/charts/gravitino --helm-extra-set-args
"--values dev/charts/gravitino/resources/scenarios/ci-values.yaml --set
image.registry="" --set image.repository=${KIND_REGISTRY}/gravitino"
--target-branch ${{ github.event.pull_request.base.ref }}
- - name: Run chart-testing (install mysql enable)
+ - name: Run chart-testing (install gravitino with postgresql enable)
if: steps.list-changed.outputs.changed == 'true'
- run: ct install --charts=dev/charts/gravitino --helm-extra-set-args
"--values dev/charts/gravitino/resources/scenarios/ci-values.yaml"
--target-branch ${{ github.event.pull_request.base.ref }}
+ run: ct install --charts=dev/charts/gravitino --helm-extra-set-args
"--values dev/charts/gravitino/resources/scenarios/pg-values.yaml --set
image.registry="" --set image.repository=${KIND_REGISTRY}/gravitino"
--target-branch ${{ github.event.pull_request.base.ref }}
- - name: Run chart-testing (install postgresql enable)
+ - name: Run chart-testing (install default,gravitino-lance-rest-server)
if: steps.list-changed.outputs.changed == 'true'
- run: ct install --charts=dev/charts/gravitino --helm-extra-set-args
"--values dev/charts/gravitino/resources/scenarios/pg-values.yaml"
--target-branch ${{ github.event.pull_request.base.ref }}
\ No newline at end of file
+ run: |
+ helm install gravitino dev/charts/gravitino -n test
--create-namespace --set image.registry="" --set
image.repository=${KIND_REGISTRY}/gravitino --wait --timeout 5m
+ kubectl run -n test --rm -i --restart=Never
--image=curlimages/curl:latest metalake-setup \
+ --command -- curl -X POST \
+ -H "Content-Type: application/json" \
+ -H "Accept: application/vnd.gravitino.v1+json" \
+ -d '{"name":"lrs_test","comment":"Quick setup"}' \
+ http://gravitino.test:8090/api/metalakes
+ ct install --charts dev/charts/gravitino-lance-rest-server
--target-branch ${{ github.event.pull_request.base.ref }} --helm-extra-set-args
"--set image.registry="" --set
image.repository=${KIND_REGISTRY}/gravitino-lance-rest --set
lanceRest.gravitinoUri=http://gravitino.test:8090 --set
lanceRest.gravitinoMetalake=lrs_test"
\ No newline at end of file
diff --git a/dev/charts/gravitino-lance-rest-server/.helmignore
b/dev/charts/gravitino-lance-rest-server/.helmignore
new file mode 100644
index 0000000000..40ca17c8da
--- /dev/null
+++ b/dev/charts/gravitino-lance-rest-server/.helmignore
@@ -0,0 +1,42 @@
+###############################################
+# 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.
+###############################################
+
+# 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/dev/charts/gravitino-lance-rest-server/Chart.yaml
b/dev/charts/gravitino-lance-rest-server/Chart.yaml
new file mode 100644
index 0000000000..927c6df07c
--- /dev/null
+++ b/dev/charts/gravitino-lance-rest-server/Chart.yaml
@@ -0,0 +1,48 @@
+#
+# 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: gravitino-lance-rest-server
+description: Apache Gravitino's Lance REST server provides high-performance
columnar data management via RESTful APIs, supporting HDFS/S3/OSS/Azure/GCS
storage backends, and Lance format compatibility for analytical workloads.
+
+home: https://gravitino.apache.org
+icon: https://gravitino.apache.org/img/apache-gravitino.svg
+keywords:
+ - gravitino
+ - lance
+ - metadata
+ - catalog
+ - analytics
+ - REST
+
+annotations:
+ licenses: Apache-2.0
+kubeVersion: '>=1.29.0-0'
+maintainers:
+ - name: Gravitino
+ email: [email protected]
+ url: https://gravitino.apache.org
+
+sources:
+ - https://github.com/apache/gravitino
+ -
https://github.com/apache/gravitino/tree/main/dev/charts/gravitino-lance-rest-server
+
+type: application
+appVersion: 1.1.1-SNAPSHOT
+version: 1.1.1
diff --git
a/dev/charts/gravitino-lance-rest-server/resources/gravitino-lance-rest-log4j2.properties
b/dev/charts/gravitino-lance-rest-server/resources/gravitino-lance-rest-log4j2.properties
new file mode 100644
index 0000000000..6bbb90edfe
--- /dev/null
+++
b/dev/charts/gravitino-lance-rest-server/resources/gravitino-lance-rest-log4j2.properties
@@ -0,0 +1,56 @@
+#
+# 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.
+#
+
+status = {{ .Values.log4j2Properties.status | default "warn" }}
+
+# Log files location
+property.basePath = {{ .Values.log4j2Properties.basePath | default
"${sys:gravitino.lance-rest-server.log.path}" }}
+property.serverName = {{ .Values.log4j2Properties.serverName | default
"${sys:gravitino.lance-rest-server.name}" }}
+
+# RollingFileAppender name, pattern, path and rollover policy
+appender.rolling.type = {{ .Values.log4j2Properties.rollingAppenderType |
default "RollingFile" }}
+appender.rolling.name = {{ .Values.log4j2Properties.rollingAppenderName |
default "fileLogger" }}
+appender.rolling.fileName = {{
.Values.log4j2Properties.rollingAppenderFileName | default
"${basePath}/${serverName}.log" }}
+appender.rolling.filePattern = {{
.Values.log4j2Properties.rollingAppenderFilePattern | default
"${basePath}/${serverName}_%d{yyyyMMdd}.log.gz" }}
+appender.rolling.layout.type = {{
.Values.log4j2Properties.rollingAppenderLayoutType | default "PatternLayout" }}
+appender.rolling.layout.pattern = {{
.Values.log4j2Properties.rollingAppenderLayoutPattern | default "%d{yyyy-MM-dd
HH:mm:ss.SSS} %level [%t] [%l] - %msg%n" }}
+appender.rolling.policies.type = {{
.Values.log4j2Properties.rollingAppenderPoliciesType | default "Policies" }}
+
+# RollingFileAppender rotation policy
+appender.rolling.policies.size.type = {{
.Values.log4j2Properties.rollingAppenderPoliciesSizeType | default
"SizeBasedTriggeringPolicy" }}
+appender.rolling.policies.size.size = {{
.Values.log4j2Properties.rollingAppenderPoliciesSizeSize | default "10MB" }}
+appender.rolling.policies.time.type = {{
.Values.log4j2Properties.rollingAppenderPoliciesTimeType | default
"TimeBasedTriggeringPolicy" }}
+appender.rolling.policies.time.interval = {{
.Values.log4j2Properties.rollingAppenderPoliciesTimeInterval | default 1 }}
+appender.rolling.policies.time.modulate = {{
.Values.log4j2Properties.rollingAppenderPoliciesTimeModulate | default true }}
+appender.rolling.strategy.type = {{
.Values.log4j2Properties.rollingAppenderStrategyType | default
"DefaultRolloverStrategy" }}
+appender.rolling.strategy.delete.type = {{
.Values.log4j2Properties.rollingAppenderStrategyDeleteType | default "Delete" }}
+appender.rolling.strategy.delete.basePath = {{
.Values.log4j2Properties.rollingAppenderStrategyDeleteBasePath | default
"${basePath}" }}
+appender.rolling.strategy.delete.maxDepth = {{
.Values.log4j2Properties.rollingAppenderStrategyDeleteMaxDepth | default 10 }}
+appender.rolling.strategy.delete.ifLastModified.type = {{
.Values.log4j2Properties.rollingAppenderStrategyDeleteIfLastModifiedType |
default "IfLastModified" }}
+
+# Delete all files older than 30 days
+appender.rolling.strategy.delete.ifLastModified.age = {{
.Values.log4j2Properties.rollingAppenderStrategyDeleteIfLastModifiedAge |
default "30d" }}
+
+# Configure root logger
+rootLogger.level = {{ .Values.log4j2Properties.rootLoggerLevel | default
"info" }}
+rootLogger.appenderRef.rolling.ref = {{
.Values.log4j2Properties.rootLoggerAppenderRefRollingRef | default "fileLogger"
}}
+
+{{- range $key, $val := .Values.additionalLog4j2Properties }}
+{{ $key }} = {{ tpl $val $ }}
+{{- end }}
diff --git
a/dev/charts/gravitino-lance-rest-server/resources/gravitino-lance-rest-server.conf
b/dev/charts/gravitino-lance-rest-server/resources/gravitino-lance-rest-server.conf
new file mode 100644
index 0000000000..e65f31cb38
--- /dev/null
+++
b/dev/charts/gravitino-lance-rest-server/resources/gravitino-lance-rest-server.conf
@@ -0,0 +1,49 @@
+#
+# 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.
+#
+
+# THE CONFIGURATION FOR Lance REST SERVER
+gravitino.lance-rest.shutdown.timeout = {{ .Values.lanceRest.shutdownTimeout |
default 3000 }}
+
+# THE CONFIGURATION FOR Lance REST WEB SERVER
+# The host name of the built-in web server
+gravitino.lance-rest.host = {{ .Values.lanceRest.host | default "0.0.0.0" }}
+gravitino.lance-rest.httpPort = {{ .Values.lanceRest.httpPort | default 9101 }}
+gravitino.lance-rest.minThreads = {{ .Values.lanceRest.minThreads | default 24
}}
+gravitino.lance-rest.maxThreads = {{ .Values.lanceRest.maxThreads | default
200 }}
+gravitino.lance-rest.stopTimeout = {{ .Values.lanceRest.stopTimeout | default
30000 }}
+gravitino.lance-rest.idleTimeout = {{ .Values.lanceRest.idleTimeout | default
30000 }}
+gravitino.lance-rest.threadPoolWorkQueueSize = {{
.Values.lanceRest.threadPoolWorkQueueSize | default 100 }}
+gravitino.lance-rest.requestHeaderSize = {{
.Values.lanceRest.requestHeaderSize | default 131072 }}
+gravitino.lance-rest.responseHeaderSize = {{
.Values.lanceRest.responseHeaderSize | default 131072 }}
+
+# THE CONFIGURATION FOR Lance namespace backend
+# The backend Lance namespace for Lance REST service, it's recommended to use
Gravitino
+gravitino.lance-rest.namespace-backend = {{ .Values.lanceRest.namespaceBackend
| default "gravitino" }}
+# The uri of the Lance REST service gravitino namespace backend
+gravitino.lance-rest.gravitino-uri = {{ .Values.lanceRest.gravitinoUri |
default "http://localhost:8090" }}
+# The metalake name used for Lance REST service gravitino namespace backend,
please create the metalake before using it, and configure the metalake name
here.
+# Please set .Values.lanceRest.gravitinoMetalake to the name of a pre-created
metalake before deploying this chart.
+{{- if eq (.Values.lanceRest.namespaceBackend | default "gravitino")
"gravitino" }}
+gravitino.lance-rest.gravitino-metalake = {{ required
"lanceRest.gravitinoMetalake must be set when namespaceBackend is gravitino"
.Values.lanceRest.gravitinoMetalake }}
+{{- end }}
+
+# Additional config items
+{{- range $key, $val := .Values.additionalConfigItems }}
+{{ $key }} = {{ tpl $val $ }}
+{{- end }}
diff --git a/dev/charts/gravitino-lance-rest-server/templates/NOTES.txt
b/dev/charts/gravitino-lance-rest-server/templates/NOTES.txt
new file mode 100644
index 0000000000..a9f4d1fbac
--- /dev/null
+++ b/dev/charts/gravitino-lance-rest-server/templates/NOTES.txt
@@ -0,0 +1,41 @@
+{{- /*
+ 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.
+ */}}
+
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range $host := .Values.ingress.hosts }}
+ {{- range .paths }}
+ http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
+ {{- end }}
+{{- end }}
+{{- else if contains "NodePort" .Values.service.type }}
+ export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o
jsonpath="{.spec.ports[0].nodePort}" services {{ include
"gravitino-lance-rest-server.fullname" . }})
+ export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o
jsonpath="{.items[0].status.addresses[0].address}")
+ echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+ NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+ You can watch the status of by running 'kubectl get --namespace {{
.Release.Namespace }} svc -w {{ include "gravitino-lance-rest-server.fullname"
. }}'
+ export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{
include "gravitino-lance-rest-server.fullname" . }} --template "{{"{{ range
(index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
+ echo http://$SERVICE_IP:{{ .Values.service.port }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+ export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l
"app.kubernetes.io/name={{ include "gravitino-lance-rest-server.name" .
}},app.kubernetes.io/instance={{ .Release.Name }}" -o
jsonpath="{.items[0].metadata.name}")
+ export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }}
$POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
+ echo "Visit http://127.0.0.1:8080 to use your application"
+ kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME
8080:$CONTAINER_PORT
+{{- end }}
diff --git a/dev/charts/gravitino-lance-rest-server/templates/_helpers.tpl
b/dev/charts/gravitino-lance-rest-server/templates/_helpers.tpl
new file mode 100644
index 0000000000..f07497f889
--- /dev/null
+++ b/dev/charts/gravitino-lance-rest-server/templates/_helpers.tpl
@@ -0,0 +1,88 @@
+{{- /*
+ 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.
+*/}}
+{{- define "gravitino-lance-rest-server.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to
this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "gravitino-lance-rest-server.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 "gravitino-lance-rest-server.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 |
trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "gravitino-lance-rest-server.labels" -}}
+helm.sh/chart: {{ include "gravitino-lance-rest-server.chart" . }}
+{{ include "gravitino-lance-rest-server.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "gravitino-lance-rest-server.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "gravitino-lance-rest-server.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "gravitino-lance-rest-server.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create }}
+{{- default (include "gravitino-lance-rest-server.fullname" .)
.Values.serviceAccount.name }}
+{{- else }}
+{{- default "default" .Values.serviceAccount.name }}
+{{- end }}
+{{- end }}
+
+{{/*
+Define the gravitino.namespace
+*/}}
+{{- define "gravitino-lance-rest-server.namespace" -}}
+{{- .Release.Namespace -}}
+{{- end -}}
diff --git a/dev/charts/gravitino/templates/configmap.yaml
b/dev/charts/gravitino-lance-rest-server/templates/configmap.yaml
similarity index 71%
copy from dev/charts/gravitino/templates/configmap.yaml
copy to dev/charts/gravitino-lance-rest-server/templates/configmap.yaml
index c497b8e07b..8db950ba73 100644
--- a/dev/charts/gravitino/templates/configmap.yaml
+++ b/dev/charts/gravitino-lance-rest-server/templates/configmap.yaml
@@ -6,7 +6,7 @@
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,
@@ -20,14 +20,15 @@
apiVersion: v1
kind: ConfigMap
metadata:
- name: {{ include "gravitino.fullname" . }}
- namespace: {{ include "gravitino.namespace" . }}
+ name: {{ include "gravitino-lance-rest-server.fullname" . }}
+ namespace: {{ include "gravitino-lance-rest-server.namespace" . }}
labels:
- {{- include "gravitino.labels" . | nindent 4 }}
+ {{- include "gravitino-lance-rest-server.labels" . | nindent 4 }}
data:
init.sh: |-
{{- tpl .Values.initScript . | nindent 4 }}
- gravitino.conf: |
- {{- tpl (.Files.Get "resources/config/gravitino.conf") . | nindent 4 }}
- log4j2.properties: |-
- {{- tpl (.Files.Get "resources/config/log4j2.properties") . | nindent 4 }}
\ No newline at end of file
+{{ $root := . }}
+{{ range $path, $bytes := .Files.Glob "resources/*" }}
+{{ base $path | indent 2 }}: |-
+{{ tpl ( $root.Files.Get $path ) $ | indent 4 }}
+{{ end }}
diff --git a/dev/charts/gravitino-lance-rest-server/templates/deployment.yaml
b/dev/charts/gravitino-lance-rest-server/templates/deployment.yaml
new file mode 100644
index 0000000000..d3ae4fb426
--- /dev/null
+++ b/dev/charts/gravitino-lance-rest-server/templates/deployment.yaml
@@ -0,0 +1,105 @@
+{{- /*
+ 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: Deployment
+metadata:
+ name: {{ include "gravitino-lance-rest-server.fullname" . }}
+ labels:
+ {{- include "gravitino-lance-rest-server.labels" . | nindent 4 }}
+ annotations:
+ {{- toYaml .Values.annotations | nindent 4 }}
+spec:
+ replicas: {{ .Values.replicaCount }}
+ selector:
+ matchLabels:
+ {{- include "gravitino-lance-rest-server.selectorLabels" . | nindent 6 }}
+ template:
+ metadata:
+ annotations:
+ checksum/config: {{ include (print $.Template.BasePath
"/configmap.yaml") . | sha256sum }}
+ {{- with .Values.podAnnotations }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ labels:
+ {{- include "gravitino-lance-rest-server.labels" . | nindent 8 }}
+ {{- with .Values.podLabels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ spec:
+ {{- with .Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ serviceAccountName: {{ include
"gravitino-lance-rest-server.serviceAccountName" . }}
+ securityContext:
+ {{- toYaml .Values.podSecurityContext | nindent 8 }}
+ containers:
+ - name: {{ .Chart.Name }}
+ securityContext:
+ {{- toYaml .Values.securityContext | nindent 12 }}
+ image: "{{ .Values.image.repository }}:{{ .Values.image.tag |
default .Chart.AppVersion }}"
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ command:
+ - "/bin/bash"
+ - "/tmp/conf/init.sh"
+ # Environment variables
+ {{- if .Values.env }}
+ env:
+ {{- toYaml .Values.env | nindent 12 }}
+ {{- end }}
+ {{- with .Values.envFrom }}
+ envFrom:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
+ ports:
+ - name: http
+ containerPort: {{ .Values.lanceRest.httpPort }}
+ protocol: TCP
+ livenessProbe:
+ {{- toYaml .Values.livenessProbe | nindent 12 }}
+ readinessProbe:
+ {{- toYaml .Values.readinessProbe | nindent 12 }}
+ resources:
+ {{- toYaml .Values.resources | nindent 12 }}
+ volumeMounts:
+ - name: lance-rest-server-config
+ mountPath: /tmp/conf/
+ {{- with .Values.volumeMounts }}
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
+ volumes:
+ - name: lance-rest-server-config
+ configMap:
+ name: {{ include "gravitino-lance-rest-server.fullname" . }}
+ {{- with .Values.volumes }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.affinity }}
+ affinity:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.tolerations }}
+ tolerations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
diff --git a/dev/charts/gravitino-lance-rest-server/templates/ingress.yaml
b/dev/charts/gravitino-lance-rest-server/templates/ingress.yaml
new file mode 100644
index 0000000000..b33c646256
--- /dev/null
+++ b/dev/charts/gravitino-lance-rest-server/templates/ingress.yaml
@@ -0,0 +1,80 @@
+{{- /*
+ 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.
+ */}}
+
+{{- if .Values.ingress.enabled -}}
+{{- $fullName := include "gravitino-lance-rest-server.fullname" . -}}
+{{- $svcPort := .Values.service.port -}}
+{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0"
.Capabilities.KubeVersion.GitVersion)) }}
+ {{- if not (hasKey .Values.ingress.annotations
"kubernetes.io/ingress.class") }}
+ {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class"
.Values.ingress.className}}
+ {{- end }}
+{{- end }}
+{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
+apiVersion: networking.k8s.io/v1
+{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
+apiVersion: networking.k8s.io/v1beta1
+{{- else -}}
+apiVersion: extensions/v1beta1
+{{- end }}
+kind: Ingress
+metadata:
+ name: {{ $fullName }}
+ labels:
+ {{- include "gravitino-lance-rest-server.labels" . | nindent 4 }}
+ {{- with .Values.ingress.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ {{- if and .Values.ingress.className (semverCompare ">=1.18-0"
.Capabilities.KubeVersion.GitVersion) }}
+ ingressClassName: {{ .Values.ingress.className }}
+ {{- end }}
+ {{- if .Values.ingress.tls }}
+ tls:
+ {{- range .Values.ingress.tls }}
+ - hosts:
+ {{- range .hosts }}
+ - {{ . | quote }}
+ {{- end }}
+ secretName: {{ .secretName }}
+ {{- end }}
+ {{- end }}
+ rules:
+ {{- range .Values.ingress.hosts }}
+ - host: {{ .host | quote }}
+ http:
+ paths:
+ {{- range .paths }}
+ - path: {{ .path }}
+ {{- if and .pathType (semverCompare ">=1.18-0"
$.Capabilities.KubeVersion.GitVersion) }}
+ pathType: {{ .pathType }}
+ {{- end }}
+ backend:
+ {{- if semverCompare ">=1.19-0"
$.Capabilities.KubeVersion.GitVersion }}
+ service:
+ name: {{ $fullName }}
+ port:
+ number: {{ $svcPort }}
+ {{- else }}
+ serviceName: {{ $fullName }}
+ servicePort: {{ $svcPort }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+{{- end }}
diff --git
a/dev/charts/gravitino-lance-rest-server/templates/poddisruptionbudget.yaml
b/dev/charts/gravitino-lance-rest-server/templates/poddisruptionbudget.yaml
new file mode 100644
index 0000000000..7b4bd33b46
--- /dev/null
+++ b/dev/charts/gravitino-lance-rest-server/templates/poddisruptionbudget.yaml
@@ -0,0 +1,50 @@
+{{- /*
+ 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.
+ */}}
+
+{{- if .Values.podDisruptionBudget.enabled }}
+{{- $minAvailableSet := and (ne (toString
.Values.podDisruptionBudget.minAvailable) "") (or
.Values.podDisruptionBudget.minAvailable (eq
(.Values.podDisruptionBudget.minAvailable | int) 0)) }}
+{{- $maxUnavailableSet := ne (toString
.Values.podDisruptionBudget.maxUnavailable) "" }}
+{{- if and $minAvailableSet $maxUnavailableSet }}
+{{- fail "podDisruptionBudget.minAvailable and
podDisruptionBudget.maxUnavailable cannot both be specified. Please specify
only one." }}
+{{- end }}
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+ name: {{ include "gravitino-lance-rest-server.fullname" . }}
+ namespace: {{ include "gravitino-lance-rest-server.namespace" . }}
+ labels:
+ {{- include "gravitino-lance-rest-server.labels" . | nindent 4 }}
+ {{- with .Values.podDisruptionBudget.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ {{- with .Values.podDisruptionBudget.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ selector:
+ matchLabels:
+ {{- include "gravitino-lance-rest-server.selectorLabels" . | nindent 6 }}
+ {{- if $minAvailableSet }}
+ minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
+ {{- end }}
+ {{- if $maxUnavailableSet }}
+ maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
+ {{- end }}
+{{- end }}
diff --git a/dev/charts/gravitino/templates/configmap.yaml
b/dev/charts/gravitino-lance-rest-server/templates/service.yaml
similarity index 65%
copy from dev/charts/gravitino/templates/configmap.yaml
copy to dev/charts/gravitino-lance-rest-server/templates/service.yaml
index c497b8e07b..9a1b542718 100644
--- a/dev/charts/gravitino/templates/configmap.yaml
+++ b/dev/charts/gravitino-lance-rest-server/templates/service.yaml
@@ -6,7 +6,7 @@
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,
@@ -18,16 +18,17 @@
*/}}
apiVersion: v1
-kind: ConfigMap
+kind: Service
metadata:
- name: {{ include "gravitino.fullname" . }}
- namespace: {{ include "gravitino.namespace" . }}
+ name: {{ include "gravitino-lance-rest-server.fullname" . }}
labels:
- {{- include "gravitino.labels" . | nindent 4 }}
-data:
- init.sh: |-
- {{- tpl .Values.initScript . | nindent 4 }}
- gravitino.conf: |
- {{- tpl (.Files.Get "resources/config/gravitino.conf") . | nindent 4 }}
- log4j2.properties: |-
- {{- tpl (.Files.Get "resources/config/log4j2.properties") . | nindent 4 }}
\ No newline at end of file
+ {{- include "gravitino-lance-rest-server.labels" . | nindent 4 }}
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ - port: {{ .Values.service.port }}
+ targetPort: http
+ protocol: TCP
+ name: http
+ selector:
+ {{- include "gravitino-lance-rest-server.selectorLabels" . | nindent 4 }}
diff --git a/dev/charts/gravitino/templates/configmap.yaml
b/dev/charts/gravitino-lance-rest-server/templates/serviceaccount.yaml
similarity index 65%
copy from dev/charts/gravitino/templates/configmap.yaml
copy to dev/charts/gravitino-lance-rest-server/templates/serviceaccount.yaml
index c497b8e07b..0af3e5196d 100644
--- a/dev/charts/gravitino/templates/configmap.yaml
+++ b/dev/charts/gravitino-lance-rest-server/templates/serviceaccount.yaml
@@ -6,7 +6,7 @@
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,
@@ -17,17 +17,16 @@
under the License.
*/}}
+{{- if .Values.serviceAccount.create -}}
apiVersion: v1
-kind: ConfigMap
+kind: ServiceAccount
metadata:
- name: {{ include "gravitino.fullname" . }}
- namespace: {{ include "gravitino.namespace" . }}
+ name: {{ include "gravitino-lance-rest-server.serviceAccountName" . }}
labels:
- {{- include "gravitino.labels" . | nindent 4 }}
-data:
- init.sh: |-
- {{- tpl .Values.initScript . | nindent 4 }}
- gravitino.conf: |
- {{- tpl (.Files.Get "resources/config/gravitino.conf") . | nindent 4 }}
- log4j2.properties: |-
- {{- tpl (.Files.Get "resources/config/log4j2.properties") . | nindent 4 }}
\ No newline at end of file
+ {{- include "gravitino-lance-rest-server.labels" . | nindent 4 }}
+ {{- with .Values.serviceAccount.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
+{{- end }}
diff --git
a/dev/charts/gravitino-lance-rest-server/templates/tests/test-connection.yaml
b/dev/charts/gravitino-lance-rest-server/templates/tests/test-connection.yaml
new file mode 100644
index 0000000000..d29ccbde59
--- /dev/null
+++
b/dev/charts/gravitino-lance-rest-server/templates/tests/test-connection.yaml
@@ -0,0 +1,64 @@
+{{- /*
+ 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: Pod
+metadata:
+ name: {{ include "gravitino-lance-rest-server.fullname" . }}-test-connection
+ namespace: {{ include "gravitino-lance-rest-server.namespace" . }}
+ annotations:
+ helm.sh/hook: test
+ helm.sh/hook-delete-policy: hook-succeeded
+spec:
+ containers:
+ - name: test-connection
+ image: curlimages/curl:latest
+ command:
+ - /bin/sh
+ - -c
+ - |
+ max_attempts=30
+ attempt=0
+ success=false
+
+ while [ $attempt -lt $max_attempts ]; do
+ http_code=$(curl -s -o /tmp/body -w "%{http_code}"
"http://${SERVICE_NAME}:${SERVICE_PORT}${TEST_PATH}")
+ if [ "$http_code" = "200" ] && grep -qi "namespace" /tmp/body; then
+ success=true
+ break
+ else
+ echo "Attempt $((attempt + 1)) failed with code
${http_code:-n/a}" && cat /tmp/body || true
+ sleep 2
+ fi
+ attempt=$((attempt + 1))
+ done
+
+ if [ "$success" = true ]; then
+ exit 0
+ else
+ exit 1
+ fi
+ env:
+ - name: SERVICE_NAME
+ value: {{ include "gravitino-lance-rest-server.fullname" . | quote }}
+ - name: SERVICE_PORT
+ value: {{ .Values.service.port | quote }}
+ - name: TEST_PATH
+ value: "/lance/v1/namespace/%24/list"
+ restartPolicy: Never
diff --git a/dev/charts/gravitino-lance-rest-server/values.yaml
b/dev/charts/gravitino-lance-rest-server/values.yaml
new file mode 100644
index 0000000000..798af9e7f9
--- /dev/null
+++ b/dev/charts/gravitino-lance-rest-server/values.yaml
@@ -0,0 +1,184 @@
+#
+# 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 gravitino-lance-rest-server.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+image:
+ repository: apache/gravitino-lance-rest
+ pullPolicy: IfNotPresent
+ # Overrides the image tag whose default is the chart appVersion.
+ tag: 1.1.1-SNAPSHOT
+
+imagePullSecrets: []
+nameOverride: ""
+fullnameOverride: ""
+
+annotations: {}
+
+## Lance REST server configuration
+lanceRest:
+ shutdownTimeout: 3000
+ host: 0.0.0.0
+ httpPort: 9101
+ minThreads: 24
+ maxThreads: 200
+ stopTimeout: 30000
+ idleTimeout: 30000
+ threadPoolWorkQueueSize: 100
+ requestHeaderSize: 131072
+ responseHeaderSize: 131072
+ # Lance namespace backend settings
+ namespaceBackend: gravitino
+ gravitinoUri: http://gravitino-server:8090
+ # Name of the target metalake; must be set for your environment.
+ gravitinoMetalake: ""
+# Rest backend configs.
+additionalConfigItems: {}
+
+## Log4j2 configuration items
+log4j2Properties:
+ status: warn
+additionalLog4j2Properties:
+ appender.console.type: Console
+ appender.console.name: consoleLogger
+ appender.console.layout.type: PatternLayout
+ appender.console.layout.pattern: "%d{yyyy-MM-dd HH:mm:ss} %-5p [%t] %c{1}:%L
- %m%n"
+ rootLogger.appenderRef.console.ref: consoleLogger
+
+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
+
+## Optional volumes for logs
+volumes:
+ - name: gravitino-rest-catalog-server-log
+ emptyDir: {}
+
+volumeMounts:
+ - name: gravitino-rest-catalog-server-log
+ 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"
+
+envFrom: []
+
+serviceAccount:
+ # Specifies whether a service account should be created
+ create: false
+ # Automatically mount a ServiceAccount's API credentials
+ automount: true
+ # Annotations to add to the service account
+ annotations: {}
+ # The name of the service account to use.
+ # If not set and create is true, a name is generated using the fullname
template
+ name: ""
+
+podAnnotations: {}
+podLabels: {}
+
+podSecurityContext: {}
+ # fsGroup: 2000
+
+securityContext: {}
+ # capabilities:
+ # drop:
+ # - ALL
+ # readOnlyRootFilesystem: true
+ # runAsNonRoot: true
+ # runAsUser: 1000
+
+service:
+ name: gravitino-lance-rest-server
+ type: ClusterIP
+ port: 9101
+ targetPort: 9101
+ annotations: {}
+ labels: {}
+ portName: http
+ nodePort: ""
+
+livenessProbe:
+ httpGet:
+ path: /lance/v1/namespace/%24/list
+ port: http
+ initialDelaySeconds: 60
+ timeoutSeconds: 10
+ periodSeconds: 30
+ failureThreshold: 5
+
+readinessProbe:
+ httpGet:
+ path: /lance/v1/namespace/%24/list
+ port: http
+ initialDelaySeconds: 30
+ timeoutSeconds: 10
+ periodSeconds: 10
+ failureThreshold: 3
+
+ingress:
+ enabled: false
+ className: "nginx"
+ annotations: {}
+ # kubernetes.io/ingress.class: nginx
+ # kubernetes.io/tls-acme: "true"
+ hosts:
+ - host: chart-example.local
+ paths:
+ - path: /
+ pathType: ImplementationSpecific
+ tls: []
+ # - secretName: chart-example-tls
+ # hosts:
+ # - chart-example.local
+
+## PodDisruptionBudget settings
+podDisruptionBudget:
+ enabled: false
+ minAvailable: 1
+ maxUnavailable: ""
+ labels: {}
+ annotations: {}
+
+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:'.
+ # limits:
+ # cpu: 100m
+ # memory: 128Mi
+ # requests:
+ # cpu: 100m
+ # memory: 128Mi
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/dev/charts/gravitino/resources/config/gravitino.conf
b/dev/charts/gravitino/resources/config/gravitino.conf
index 222bd67b4a..1d3f20f33c 100644
--- a/dev/charts/gravitino/resources/config/gravitino.conf
+++ b/dev/charts/gravitino/resources/config/gravitino.conf
@@ -179,7 +179,7 @@ gravitino.audit.writer.file.flushIntervalSecs = {{
.Values.audit.writer.file.flu
gravitino.audit.writer.file.append = {{ .Values.audit.writer.file.append }}
# Metrics configuration
-gravitino.metrics.timeSlidingWindowSecs = {{
.Values.metrics.timeSlidingWindowSecs }}
+gravitino.metrics.timeSlidingWindowSecs = {{
.Values.metrics.timeSlidingWindowSecs }}
{{- if .Values.visibleConfigs }}
gravitino.server.visibleConfigs = {{ .Values.visibleConfigs }}
diff --git a/dev/charts/gravitino/templates/configmap.yaml
b/dev/charts/gravitino/templates/configmap.yaml
index c497b8e07b..9551f384cf 100644
--- a/dev/charts/gravitino/templates/configmap.yaml
+++ b/dev/charts/gravitino/templates/configmap.yaml
@@ -27,7 +27,7 @@ metadata:
data:
init.sh: |-
{{- tpl .Values.initScript . | nindent 4 }}
- gravitino.conf: |
+ gravitino.conf: |-
{{- tpl (.Files.Get "resources/config/gravitino.conf") . | nindent 4 }}
log4j2.properties: |-
{{- tpl (.Files.Get "resources/config/log4j2.properties") . | nindent 4 }}
\ No newline at end of file
diff --git a/dev/charts/gravitino/templates/deployment.yaml
b/dev/charts/gravitino/templates/deployment.yaml
index ddf498c52d..1991be47ef 100644
--- a/dev/charts/gravitino/templates/deployment.yaml
+++ b/dev/charts/gravitino/templates/deployment.yaml
@@ -52,120 +52,120 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
initContainers:
- - name: sqlfile
- image: {{ include "gravitino.image" . }}
- imagePullPolicy: "{{ .Values.image.pullPolicy }}"
- command:
- - /bin/bash
- - -c
- - |
- cp -r /root/gravitino/scripts/* /tmp/scripts/
- VERSION=$(ls /root/gravitino/libs/gravitino-server-* | grep -oP
'[0-9]+\.[0-9]+\.[0-9]+'|head -1)
- echo $VERSION > /tmp/scripts/version.txt
- resources:
- {{- toYaml .Values.initResources | nindent 10 }}
- volumeMounts:
- - mountPath: /tmp/scripts/
- name: scripts-emptydir
+ - name: sqlfile
+ image: {{ include "gravitino.image" . }}
+ imagePullPolicy: "{{ .Values.image.pullPolicy }}"
+ command:
+ - /bin/bash
+ - -c
+ - |
+ cp -r /root/gravitino/scripts/* /tmp/scripts/
+ VERSION=$(ls /root/gravitino/libs/gravitino-server-* | grep -oP
'[0-9]+\.[0-9]+\.[0-9]+'|head -1)
+ echo $VERSION > /tmp/scripts/version.txt
+ resources:
+ {{- toYaml .Values.initResources | nindent 12 }}
+ volumeMounts:
+ - mountPath: /tmp/scripts/
+ name: scripts-emptydir
{{- if .Values.mysql.enabled }}
- - name: init-mysql
- image: {{ include "init-mysql.image" . }}
- imagePullPolicy: "{{ .Values.image.pullPolicy }}"
- command:
- - /bin/bash
- - -c
- - |
- while ! mysql -h {{ .Release.Name }}-mysql -u root -e "SELECT 1";
do
- echo "Waiting for MySQL to be ready..."
- sleep 2
- done
- VERSION=$(cat /scripts/version.txt)
- if [ -z "$VERSION" ]; then
- echo "ERROR:Please set VERSION"
- exit 1
- fi
- dir="/scripts/mysql"
- schema_file=$(ls $dir/schema-*-mysql.sql | sort -V | awk -F'[-]'
'$2 <= '$VERSION' {print $0}' | tail -n 1)
- if [ ! -f "$schema_file" ]; then
- echo "ERROR:Failed to find schema file $schema_file"
- exit 1
- fi
- upgrade_file=$(ls $dir/upgrade-*-to-*-mysql.sql | sort -V | awk
-F'[-]' '$4 <= '$VERSION' {print $0}' | tail -n 1)
- if [ ! -f "$upgrade_file" ]; then
- echo "ERROR:Failed to find upgrade file $upgrade_file"
- exit 1
- fi
- echo "Schema file: $schema_file"
- echo "Upgrade file: $upgrade_file"
- if ! mysql -h {{ .Release.Name }}-mysql -u root -D $GRAVITINO_DB
<"$upgrade_file"; then
- echo "WARNING: Upgrade script failed: $upgrade_file" >&2
- echo "Continuing with schema script..." >&2
- fi
- mysql -h {{ .Release.Name }}-mysql -u root -D $GRAVITINO_DB
<$schema_file
- resources:
- {{- toYaml .Values.initResources | nindent 10 }}
- env:
- - name: MYSQL_PWD
- valueFrom:
- secretKeyRef:
- name: {{ .Release.Name }}-mysql
- key: mysql-root-password
- - name: GRAVITINO_DB
- value: {{ .Values.mysql.auth.database }}
- volumeMounts:
- - mountPath: /scripts
- name: scripts-emptydir
+ - name: init-mysql
+ image: {{ include "init-mysql.image" . }}
+ imagePullPolicy: "{{ .Values.image.pullPolicy }}"
+ command:
+ - /bin/bash
+ - -c
+ - |
+ while ! mysql -h {{ .Release.Name }}-mysql -u root -e "SELECT
1"; do
+ echo "Waiting for MySQL to be ready..."
+ sleep 2
+ done
+ VERSION=$(cat /scripts/version.txt)
+ if [ -z "$VERSION" ]; then
+ echo "ERROR:Please set VERSION"
+ exit 1
+ fi
+ dir="/scripts/mysql"
+ schema_file=$(ls $dir/schema-*-mysql.sql | sort -V | awk -F'[-]'
'$2 <= '$VERSION' {print $0}' | tail -n 1)
+ if [ ! -f "$schema_file" ]; then
+ echo "ERROR:Failed to find schema file $schema_file"
+ exit 1
+ fi
+ upgrade_file=$(ls $dir/upgrade-*-to-*-mysql.sql | sort -V | awk
-F'[-]' '$4 <= '$VERSION' {print $0}' | tail -n 1)
+ if [ ! -f "$upgrade_file" ]; then
+ echo "ERROR:Failed to find upgrade file $upgrade_file"
+ exit 1
+ fi
+ echo "Schema file: $schema_file"
+ echo "Upgrade file: $upgrade_file"
+ if ! mysql -h {{ .Release.Name }}-mysql -u root -D $GRAVITINO_DB
<"$upgrade_file"; then
+ echo "WARNING: Upgrade script failed: $upgrade_file" >&2
+ echo "Continuing with schema script..." >&2
+ fi
+ mysql -h {{ .Release.Name }}-mysql -u root -D $GRAVITINO_DB
<$schema_file
+ resources:
+ {{- toYaml .Values.initResources | nindent 12 }}
+ env:
+ - name: MYSQL_PWD
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Release.Name }}-mysql
+ key: mysql-root-password
+ - name: GRAVITINO_DB
+ value: {{ .Values.mysql.auth.database }}
+ volumeMounts:
+ - mountPath: /scripts
+ name: scripts-emptydir
{{- end }}
{{- if .Values.postgresql.enabled }}
- - name: init-postgresql
- image: {{ include "init-postgresql.image" . }}
- imagePullPolicy: "{{ .Values.image.pullPolicy }}"
- command:
- - /bin/bash
- - -c
- - |
- while ! PGPASSWORD=$POSTGRES_PASSWORD psql -h {{ .Release.Name
}}-postgresql -U $POSTGRES_USER -c "SELECT 1"; do
- echo "Waiting for PostgreSQL to be ready..."
- sleep 2
- done
- VERSION=$(cat /scripts/version.txt)
- if [ -z "$VERSION" ]; then
- echo "ERROR:Please set VERSION"
- exit 1
- fi
- dir="/scripts/postgresql"
- schema_file=$(ls $dir/schema-*-postgresql.sql | sort -V | awk
-F'[-]' '$2 <= '$VERSION' {print $0}' | tail -n 1)
- if [ ! -f "$schema_file" ]; then
- echo "ERROR:Failed to find schema file $schema_file"
- exit 1
- fi
- upgrade_file=$(ls $dir/upgrade-*-to-*-postgresql.sql | sort -V |
awk -F'[-]' '$4 <= '$VERSION' {print $0}' | tail -n 1)
- if [ ! -f "$upgrade_file" ]; then
- echo "ERROR:Failed to find upgrade file $upgrade_file"
- exit 1
- fi
- echo "Schema file: $schema_file"
- echo "Upgrade file: $upgrade_file"
- if ! PGPASSWORD=$POSTGRES_PASSWORD psql -h {{ .Release.Name
}}-postgresql -U $POSTGRES_USER -d $GRAVITINO_DB -f "$upgrade_file"; then
- echo "WARNING: Upgrade script failed: $upgrade_file" >&2
- echo "Continuing with schema script..." >&2
- fi
- PGPASSWORD=$POSTGRES_PASSWORD psql -h {{ .Release.Name
}}-postgresql -U $POSTGRES_USER -d $GRAVITINO_DB -f "$schema_file"
- resources:
- {{- toYaml .Values.initResources | nindent 10 }}
- env:
- - name: POSTGRES_USER
- value: {{ .Values.postgresql.auth.username }}
- - name: GRAVITINO_DB
- value: {{ .Values.postgresql.auth.database }}
- - name: POSTGRES_PASSWORD
- valueFrom:
- secretKeyRef:
- name: {{ .Release.Name }}-postgresql
- key: password
- volumeMounts:
- - mountPath: /scripts
- name: scripts-emptydir
+ - name: init-postgresql
+ image: {{ include "init-postgresql.image" . }}
+ imagePullPolicy: "{{ .Values.image.pullPolicy }}"
+ command:
+ - /bin/bash
+ - -c
+ - |
+ while ! PGPASSWORD=$POSTGRES_PASSWORD psql -h {{ .Release.Name
}}-postgresql -U $POSTGRES_USER -c "SELECT 1"; do
+ echo "Waiting for PostgreSQL to be ready..."
+ sleep 2
+ done
+ VERSION=$(cat /scripts/version.txt)
+ if [ -z "$VERSION" ]; then
+ echo "ERROR:Please set VERSION"
+ exit 1
+ fi
+ dir="/scripts/postgresql"
+ schema_file=$(ls $dir/schema-*-postgresql.sql | sort -V | awk
-F'[-]' '$2 <= '$VERSION' {print $0}' | tail -n 1)
+ if [ ! -f "$schema_file" ]; then
+ echo "ERROR:Failed to find schema file $schema_file"
+ exit 1
+ fi
+ upgrade_file=$(ls $dir/upgrade-*-to-*-postgresql.sql | sort -V |
awk -F'[-]' '$4 <= '$VERSION' {print $0}' | tail -n 1)
+ if [ ! -f "$upgrade_file" ]; then
+ echo "ERROR:Failed to find upgrade file $upgrade_file"
+ exit 1
+ fi
+ echo "Schema file: $schema_file"
+ echo "Upgrade file: $upgrade_file"
+ if ! PGPASSWORD=$POSTGRES_PASSWORD psql -h {{ .Release.Name
}}-postgresql -U $POSTGRES_USER -d $GRAVITINO_DB -f "$upgrade_file"; then
+ echo "WARNING: Upgrade script failed: $upgrade_file" >&2
+ echo "Continuing with schema script..." >&2
+ fi
+ PGPASSWORD=$POSTGRES_PASSWORD psql -h {{ .Release.Name
}}-postgresql -U $POSTGRES_USER -d $GRAVITINO_DB -f "$schema_file"
+ resources:
+ {{- toYaml .Values.initResources | nindent 12 }}
+ env:
+ - name: POSTGRES_USER
+ value: {{ .Values.postgresql.auth.username }}
+ - name: GRAVITINO_DB
+ value: {{ .Values.postgresql.auth.database }}
+ - name: POSTGRES_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ .Release.Name }}-postgresql
+ key: password
+ volumeMounts:
+ - mountPath: /scripts
+ name: scripts-emptydir
{{- end }}
containers:
- name: {{ include "gravitino.name" . }}
@@ -182,7 +182,7 @@ spec:
{{- toYaml .Values.resources | nindent 12 }}
securityContext:
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
- {{- if or .Values.env .Values.envWithTpl }}
+ {{- if or .Values.env .Values.envWithTpl }}
env:
{{- with .Values.env }}
{{- toYaml . | nindent 12 }}
@@ -191,11 +191,11 @@ spec:
- name: {{ $item.name }}
value: {{ tpl $item.value $ | quote }}
{{- end }}
- {{- end }}
- {{- if .Values.envFrom }}
+ {{- end }}
+ {{- if .Values.envFrom }}
envFrom:
{{- toYaml .Values.envFrom | nindent 12 }}
- {{- end }}
+ {{- end }}
ports:
- name: {{ .Values.service.portName }}
containerPort: {{ .Values.service.targetPort }}
@@ -206,15 +206,15 @@ spec:
containerPort: {{ $item.targetPort }}
protocol: {{ $item.protocol }}
{{- end }}
- {{- end }}
+ {{- end }}
volumeMounts:
- name: gravitino-conf
mountPath: /tmp/conf
- name: storage
mountPath: {{ .Values.entity.storagePath }}
- {{- if .Values.extraVolumeMounts }}
- {{- toYaml .Values.extraVolumeMounts | nindent 12 }}
- {{- end }}
+ {{- if .Values.extraVolumeMounts }}
+ {{- toYaml .Values.extraVolumeMounts | nindent 12 }}
+ {{- end }}
nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
affinity:
diff --git a/dev/release/release-tag.sh b/dev/release/release-tag.sh
index 2c679f49da..a6d1dd623a 100755
--- a/dev/release/release-tag.sh
+++ b/dev/release/release-tag.sh
@@ -101,21 +101,37 @@ else
exit 1
fi
-sed -i".tmp8" 's/^version = .*$/version =
"'"$PYGRAVITINO_RELEASE_VERSION"'"/g' mcp-server/pyproject.toml
+sed -i".tmp8" 's/^appVersion: .*$/appVersion: '"$RELEASE_VERSION"'/g'
dev/charts/gravitino-lance-rest-server/Chart.yaml
+
+if [[ $(sed -n '30p' dev/charts/gravitino-lance-rest-server/values.yaml) =~ ^"
tag: " ]]; then
+ sed -i".tmp9" '30s/ tag: .*$/ tag: '"$RELEASE_VERSION"'/g'
dev/charts/gravitino-lance-rest-server/values.yaml
+else
+ echo "Error: Could not find 'tag:' in line 30 of
dev/charts/gravitino-lance-rest-server/values.yaml"
+ exit 1
+fi
+
+sed -i".tmp10" 's/^version = .*$/version =
"'"$PYGRAVITINO_RELEASE_VERSION"'"/g' mcp-server/pyproject.toml
CHART_VERSION=$(grep -e '^version: .*' dev/charts/gravitino/Chart.yaml | cut
-d':' -f2 | sed 's/^ *//;s/ *$//')
CHART_SHORT_VERSION=$(echo "$CHART_VERSION" | cut -d . -f 1-2)
CHART_REV=$(echo "$CHART_VERSION" | cut -d . -f 3 | cut -d '-' -f 1)
CHART_REV=$((CHART_REV + 1))
NEXT_CHART_VERSION="${CHART_SHORT_VERSION}.${CHART_REV}"
-sed -i".tmp9" 's/^version: .*$/version: '"$NEXT_CHART_VERSION"'/g'
dev/charts/gravitino/Chart.yaml
+sed -i".tmp11" 's/^version: .*$/version: '"$NEXT_CHART_VERSION"'/g'
dev/charts/gravitino/Chart.yaml
IRC_CHART_VERSION=$(grep -e '^version: .*'
dev/charts/gravitino-iceberg-rest-server/Chart.yaml | cut -d':' -f2 | sed 's/^
*//;s/ *$//')
IRC_CHART_SHORT_VERSION=$(echo "$IRC_CHART_VERSION" | cut -d . -f 1-2)
IRC_CHART_REV=$(echo "$IRC_CHART_VERSION" | cut -d . -f 3 | cut -d '-' -f 1)
IRC_CHART_REV=$((IRC_CHART_REV + 1))
NEXT_IRC_CHART_VERSION="${IRC_CHART_SHORT_VERSION}.${IRC_CHART_REV}"
-sed -i".tmp10" 's/^version: .*$/version: '"$NEXT_IRC_CHART_VERSION"'/g'
dev/charts/gravitino-iceberg-rest-server/Chart.yaml
+sed -i".tmp12" 's/^version: .*$/version: '"$NEXT_IRC_CHART_VERSION"'/g'
dev/charts/gravitino-iceberg-rest-server/Chart.yaml
+
+LRC_CHART_VERSION=$(grep -e '^version: .*'
dev/charts/gravitino-lance-rest-server/Chart.yaml | cut -d':' -f2 | sed 's/^
*//;s/ *$//')
+LRC_CHART_SHORT_VERSION=$(echo "$LRC_CHART_VERSION" | cut -d . -f 1-2)
+LRC_CHART_REV=$(echo "$LRC_CHART_VERSION" | cut -d . -f 3 | cut -d '-' -f 1)
+LRC_CHART_REV=$((LRC_CHART_REV + 1))
+NEXT_LRC_CHART_VERSION="${LRC_CHART_SHORT_VERSION}.${LRC_CHART_REV}"
+sed -i".tmp13" 's/^version: .*$/version: '"$NEXT_LRC_CHART_VERSION"'/g'
dev/charts/gravitino-lance-rest-server/Chart.yaml
# update docs version
"$SELF/update-java-doc-version.sh" "$RELEASE_VERSION" "$SELF/gravitino"
@@ -125,21 +141,32 @@ echo "Creating tag $RELEASE_TAG at the head of
$GIT_BRANCH"
git tag $RELEASE_TAG
# Create next version
-sed -i".tmp11" 's/version = .*$/version = '"$NEXT_VERSION"'/g'
gradle.properties
-sed -i".tmp12" 's/ version=.*$/
version="'"$PYGRAVITINO_NEXT_VERSION"'",/g' clients/client-python/setup.py
-sed -i".tmp13" 's/^version = .*$/version = \"'"$NEXT_VERSION"'\"/g'
clients/filesystem-fuse/Cargo.toml
-sed -i".tmp14" 's/appVersion: .*$/appVersion: '"$NEXT_VERSION"'/g'
dev/charts/gravitino/Chart.yaml
-sed -i".tmp15" '34s/ tag: .*$/ tag: '"$NEXT_VERSION"'/'
dev/charts/gravitino/values.yaml
+sed -i".tmp14" 's/version = .*$/version = '"$NEXT_VERSION"'/g'
gradle.properties
+sed -i".tmp15" 's/ version=.*$/
version="'"$PYGRAVITINO_NEXT_VERSION"'",/g' clients/client-python/setup.py
+sed -i".tmp16" 's/^version = .*$/version = \"'"$NEXT_VERSION"'\"/g'
clients/filesystem-fuse/Cargo.toml
+
+# Increase the chart version of Gravitino
+sed -i".tmp17" 's/appVersion: .*$/appVersion: '"$NEXT_VERSION"'/g'
dev/charts/gravitino/Chart.yaml
+sed -i".tmp18" '34s/ tag: .*$/ tag: '"$NEXT_VERSION"'/g'
dev/charts/gravitino/values.yaml
CHART_REV=$((CHART_REV + 1))
NEXT_CHART_VERSION="${CHART_SHORT_VERSION}.${CHART_REV}"
-sed -i".tmp16" 's/^version: .*$/version: '"$NEXT_CHART_VERSION"'/g'
dev/charts/gravitino/Chart.yaml
+sed -i".tmp19" 's/^version: .*$/version: '"$NEXT_CHART_VERSION"'/g'
dev/charts/gravitino/Chart.yaml
+# Increase the chart version of Gravitino Iceberg REST server chart
IRC_CHART_REV=$((IRC_CHART_REV + 1))
NEXT_IRC_CHART_VERSION="${IRC_CHART_SHORT_VERSION}.${IRC_CHART_REV}"
-sed -i".tmp17" 's/appVersion: .*$/appVersion: '"$NEXT_VERSION"'/g'
dev/charts/gravitino-iceberg-rest-server/Chart.yaml
-sed -i".tmp18" '24s/ tag: .*$/ tag: '"$NEXT_VERSION"'/'
dev/charts/gravitino-iceberg-rest-server/values.yaml
-sed -i".tmp19" 's/^version: .*$/version: '"$NEXT_IRC_CHART_VERSION"'/g'
dev/charts/gravitino-iceberg-rest-server/Chart.yaml
-sed -i".tmp20" 's/^version = .*$/version = "'"$PYGRAVITINO_NEXT_VERSION"'"/g'
mcp-server/pyproject.toml
+sed -i".tmp20" 's/appVersion: .*$/appVersion: '"$NEXT_VERSION"'/g'
dev/charts/gravitino-iceberg-rest-server/Chart.yaml
+sed -i".tmp21" '24s/ tag: .*$/ tag: '"$NEXT_VERSION"'/g'
dev/charts/gravitino-iceberg-rest-server/values.yaml
+sed -i".tmp22" 's/^version: .*$/version: '"$NEXT_IRC_CHART_VERSION"'/g'
dev/charts/gravitino-iceberg-rest-server/Chart.yaml
+
+# Increase the chart version of Gravitino Lance REST server chart
+LRC_CHART_REV=$((LRC_CHART_REV + 1))
+NEXT_LRC_CHART_VERSION="${LRC_CHART_SHORT_VERSION}.${LRC_CHART_REV}"
+sed -i".tmp23" 's/appVersion: .*$/appVersion: '"$NEXT_VERSION"'/g'
dev/charts/gravitino-lance-rest-server/Chart.yaml
+sed -i".tmp24" '30s/ tag: .*$/ tag: '"$NEXT_VERSION"'/g'
dev/charts/gravitino-lance-rest-server/values.yaml
+sed -i".tmp25" 's/^version: .*$/version: '"$NEXT_LRC_CHART_VERSION"'/g'
dev/charts/gravitino-lance-rest-server/Chart.yaml
+
+sed -i".tmp26" 's/^version = .*$/version = "'"$PYGRAVITINO_NEXT_VERSION"'"/g'
mcp-server/pyproject.toml
git commit -a -m "Preparing development version $NEXT_VERSION"
diff --git a/docs/lance-rest-server-chart.md b/docs/lance-rest-server-chart.md
new file mode 100644
index 0000000000..9af460e649
--- /dev/null
+++ b/docs/lance-rest-server-chart.md
@@ -0,0 +1,99 @@
+---
+title: "Install Lance REST Server on Kubernetes"
+slug: /lance-rest-server-chart
+keyword:
+ - Lance REST Server Helm Chart
+license: "This software is licensed under the Apache License version 2."
+---
+
+# Install Lance REST Server on Kubernetes
+
+This Helm chart deploys Apache Gravitino Lance REST Server on Kubernetes with
customizable configurations.
+
+## Prerequisites
+
+- Kubernetes 1.29+
+- Helm 3+
+
+## Update Chart Dependency
+
+The Gravitino Lance REST Server Helm chart has not yet been officially
released.
+To proceed, please clone the repository, navigate to the chart directory
[charts](../dev/charts), and execute the Helm dependency update command.
+
+```console
+helm dependency update [CHART]
+```
+
+## View Chart values
+
+You can customize values.yaml parameters to override chart default settings.
Additionally, Gravitino Lance REST Server configurations in
[gravitino-lance-rest-server.conf](../dev/charts/gravitino-lance-rest-server/resources/gravitino-lance-rest-server.conf)
can be modified through Helm values.yaml.
+
+To display the default values of the chart, run:
+
+```console
+helm show values [CHART]
+```
+
+## Install Helm Chart
+
+```console
+helm install [RELEASE_NAME] [CHART] [flags]
+```
+
+### Deploy with Default Configuration
+
+Run the following command to deploy Gravitino Lance REST Server using the
default settings, specifying the container image version using `--set
image.tag=<version>` (replace `<version>` with the desired image tag):
+
+```console
+helm upgrade --install gravitino ./gravitino-lance-rest-server \
+ -n gravitino \
+ --create-namespace \
+ --set image.tag=<version> \
+ --set replicas=2 \
+ --set resources.requests.memory="4Gi" \
+ --set resources.requests.cpu="2"
+```
+
+### Deploy with Custom Configuration
+
+To customize the deployment, use the --set flag to override specific values:
+
+```console
+helm upgrade --install gravitino ./gravitino-lance-rest-server \
+ -n gravitino \
+ --create-namespace \
+ --set key1=val1,key2=val2,...
+```
+Alternatively, you can provide a custom values.yaml file:
+
+```console
+helm upgrade --install gravitino ./gravitino-lance-rest-server \
+ -n gravitino \
+ --create-namespace \
+ -f /path/to/values.yaml
+```
+_Note: \
+The path '/path/to/values.yaml' refers to the actual path to the values.yaml
file._
+
+## Configuration Notes
+
+### Gravitino Backend Configuration
+
+Make sure to configure the Gravitino backend connection properly:
+
+```yaml
+lanceRest:
+ gravitinoUri: http://your-gravitino-server:8090
+ gravitinoMetalake: your-metalake-name
+```
+
+The Lance REST Server requires a running Gravitino instance to function.
Ensure:
+1. The Gravitino server is accessible from the Lance REST Server pods
+2. The metalake specified in `gravitinoMetalake` exists in Gravitino
+3. Network policies allow communication between Lance REST and Gravitino
+
+## Uninstall Helm Chart
+
+```console
+helm uninstall [RELEASE_NAME] -n [NAMESPACE]
+```