flyrain commented on code in PR #3738: URL: https://github.com/apache/polaris/pull/3738#discussion_r2795607907
########## helm/polaris/README.md: ########## @@ -1,468 +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. -# -Title: Polaris Helm Chart -type: docs -weight: 675 ---- - -<!--- - This README.md file was generated with: - https://github.com/norwoodj/helm-docs - Do not modify the README.md file directly, please modify README.md.gotmpl instead. - To re-generate the README.md file, install helm-docs then run from the repo root: - helm-docs --chart-search-root=helm +<!-- + 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. --> -   - -A Helm chart for Apache Polaris (incubating). - -**Homepage:** <https://polaris.apache.org/> - -## Source Code - -* <https://github.com/apache/polaris> - -## Installation - -The instructions below are for the local Minikube cluster. They assume Minikube and Helm are installed. - -### Installing from the official repository (recommended) - -Start the Minikube cluster, add the official Polaris Helm repository, create the target namespace, and install the chart: -```bash -minikube start -helm repo add polaris https://downloads.apache.org/incubator/polaris/helm-chart -helm repo update -kubectl create namespace polaris -helm install polaris polaris/polaris --namespace polaris --devel -``` - -> [!NOTE] -> The --devel flag is required while Polaris is in the incubation phase. -> Helm treats the -incubating suffix as a pre‑release by SemVer rules, and will skip charts that are not in a stable versioning scheme by default. - -Now the cluster should be up and running. You can run the built-in connection test to verify: -```bash -helm test polaris --namespace polaris -``` - -Default Polaris Helm chart values are for a non-persistent backend. To use a persistent backend, you will need to override default values and create required resources. -Polaris Helm chart package includes a number of files that can be used as a starting point for such configuration. To use them, download the chart into a local directory: -```bash -helm pull polaris \ - --repo https://downloads.apache.org/incubator/polaris/helm-chart \ - --devel \ - --untar \ - --untardir ./helm -``` - -> [!WARNING] -> The examples below use values files located in the `helm/polaris/ci` directory. -> **These files are intended for testing purposes primarily, and may not be suitable for production use**. -> For production deployments, create your own values files based on the provided examples. - -Create required resources: -```bash -kubectl apply --namespace polaris -f helm/polaris/ci/fixtures/ -kubectl wait --namespace polaris --for=condition=ready pod --selector=app.kubernetes.io/name=postgres --timeout=120s -``` - -> [!WARNING] -> The Postgres deployment set up in the fixtures directory is intended for testing purposes only and is not suitable for production use. For production deployments, use a managed Postgres service or a properly configured and secured Postgres instance. - -Install the chart with a persistent backend: -```bash -helm upgrade --install --namespace polaris \ - --values helm/polaris/ci/persistence-values.yaml \ - polaris helm/polaris -kubectl wait --namespace polaris --for=condition=ready pod --selector=app.kubernetes.io/name=polaris --timeout=120s -``` - -Run the catalog bootstrap using the Polaris admin tool to initialize the catalog with the required configuration. -For example, to run it as a new pod in the Minikube cluster (the polaris-admin-tool image will be pulled automatically from Docker Hub): -```bash -kubectl run polaris-bootstrap \ - -n polaris \ - --image=apache/polaris-admin-tool:latest \ - --restart=Never \ - --rm -it \ - --env="quarkus.datasource.username=$(kubectl get secret polaris-persistence -n polaris -o jsonpath='{.data.username}' | base64 --decode)" \ - --env="quarkus.datasource.password=$(kubectl get secret polaris-persistence -n polaris -o jsonpath='{.data.password}' | base64 --decode)" \ - --env="quarkus.datasource.jdbc.url=$(kubectl get secret polaris-persistence -n polaris -o jsonpath='{.data.jdbcUrl}' | base64 --decode)" \ - -- \ - bootstrap -r POLARIS -c POLARIS,root,pass -p -``` - -### Build and install from source (advanced) - -Here it is assumed that you have cloned the Polaris Git repository and set up prerequisites to build the project (see [Quickstart Guide](https://polaris.apache.org/in-dev/unreleased/getting-started/install-dependencies/) for details). - -Start the Minikube cluster, then build and load the image into the Minikube cluster: - -```bash -minikube start -eval $(minikube docker-env) - -./gradlew \ - :polaris-server:assemble \ - :polaris-server:quarkusAppPartsBuild --rerun \ - :polaris-admin:assemble \ - :polaris-admin:quarkusAppPartsBuild --rerun \ - -Dquarkus.container-image.build=true -``` - -Create the target namespace: -```bash -kubectl create namespace polaris -``` - -Create all the required resources in the `polaris` namespace. This usually includes a Postgres -database, Kubernetes secrets, and service accounts. The Polaris chart does not create -these resources automatically, as they are not required for all Polaris deployments. The chart will -fail if these resources are not created beforehand. You can find some examples in the -`helm/polaris/ci/fixtures` directory, but beware that these are primarily intended for tests. For example, you can run the following commands: -```bash -kubectl apply --namespace polaris -f helm/polaris/ci/fixtures/ -kubectl wait --namespace polaris --for=condition=ready pod --selector=app.kubernetes.io/name=postgres --timeout=120s -``` - -Below are two sample deployment models for installing the chart: one with a non-persistent backend and another with a persistent backend. - -> [!WARNING] -> The examples below use values files located in the `helm/polaris/ci` directory. -> **These files are intended for testing purposes primarily, and may not be suitable for production use**. -> For production deployments, create your own values files based on the provided examples. - -#### Non-persistent backend - -Install the chart with a non-persistent backend. From the Polaris repo root: -```bash -helm upgrade --install --namespace polaris \ - polaris helm/polaris -``` - -#### Persistent backend - -> [!WARNING] -> The Postgres deployment set up in the fixtures directory is intended for testing purposes only and is not suitable for production use. For production deployments, use a managed Postgres service or a properly configured and secured Postgres instance. - -Install the chart with a persistent backend. From the Polaris repo root: -```bash -helm upgrade --install --namespace polaris \ - --values helm/polaris/ci/persistence-values.yaml \ - polaris helm/polaris -kubectl wait --namespace polaris --for=condition=ready pod --selector=app.kubernetes.io/name=polaris --timeout=120s -``` - -To access Polaris and Postgres locally, set up port forwarding for both services (this is needed for bootstrap processes): -```bash -kubectl port-forward -n polaris $(kubectl get pod -n polaris -l app.kubernetes.io/name=polaris -o jsonpath='{.items[0].metadata.name}') 8181:8181 & - -kubectl port-forward -n polaris $(kubectl get pod -n polaris -l app.kubernetes.io/name=postgres -o jsonpath='{.items[0].metadata.name}') 5432:5432 & -``` - -Run the catalog bootstrap using the Polaris admin tool. This step initializes the catalog with the required configuration: -```bash -container_envs=$(kubectl exec -it -n polaris $(kubectl get pod -n polaris -l app.kubernetes.io/name=polaris -o jsonpath='{.items[0].metadata.name}') -- env) -export QUARKUS_DATASOURCE_USERNAME=$(echo "$container_envs" | grep quarkus.datasource.username | awk -F '=' '{print $2}' | tr -d '\n\r') -export QUARKUS_DATASOURCE_PASSWORD=$(echo "$container_envs" | grep quarkus.datasource.password | awk -F '=' '{print $2}' | tr -d '\n\r') -export QUARKUS_DATASOURCE_JDBC_URL=$(echo "$container_envs" | grep quarkus.datasource.jdbc.url | sed 's/postgres/localhost/2' | awk -F '=' '{print $2}' | tr -d '\n\r') - -java -jar runtime/admin/build/quarkus-app/quarkus-run.jar bootstrap -c POLARIS,root,pass -r POLARIS -``` - -### Using the Gateway API (Advanced) - -You may want to use the [Kubernetes Gateway API](https://gateway-api.sigs.k8s.io/) for more advanced network routing. In most cases this would already be installed by your cluster admins. The following is an example set of commands to run to install the gateway: -```bash -# ref: https://gateway-api.sigs.k8s.io/guides/getting-started/#install-standard-channel -kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/latest/download/standard-install.yaml -``` - -With that installed, you can enable and configure the `gateway` values. This will make it possible to use the HTTPRoute resource, enable and configure the `httproute` values. - -> [!NOTE] -> Only one of HTTPRoute or Ingress can be defined. Defining both will result in errors. - -### Uninstalling - -```bash -helm uninstall --namespace polaris polaris - -kubectl delete --namespace polaris -f helm/polaris/ci/fixtures/ - -kubectl delete namespace polaris -``` - -## Development & Testing - -This section is intended for developers who want to run the Polaris Helm chart tests. - -### Prerequisites - -The following tools are required to run the tests: - -* [Helm Unit Test](https://github.com/helm-unittest/helm-unittest) -* [Chart Testing](https://github.com/helm/chart-testing) -* [yamllint](https://github.com/adrienverge/yamllint) - -Quick installation instructions for these tools: -```bash -helm plugin install https://github.com/helm-unittest/helm-unittest.git -brew install chart-testing -brew install yamllint -``` - -The integration tests also require some fixtures to be deployed. The `ci/fixtures` directory -contains the required resources. To deploy them, run the following command: -```bash -kubectl apply --namespace polaris -f helm/polaris/ci/fixtures/ -kubectl wait --namespace polaris --for=condition=ready pod --selector=app.kubernetes.io/name=postgres --timeout=120s -``` +# Helm Chart for Apache Polaris -The `helm/polaris/ci` directory contains a number of values files that will be used to install the chart with -different configurations. +[](https://artifacthub.io/packages/search?repo=apache-polaris) -### Running the unit tests +[Apache Polaris](https://polaris.apache.org/) is an open-source, fully-featured catalog for Apache Iceberg™. It +implements Iceberg's REST API, enabling seamless multi-engine interoperability across a wide range of platforms, +including Apache Doris™, Apache Flink®, Apache Spark™, Dremio® OSS, StarRocks, and Trino. -Helm unit tests do not require a Kubernetes cluster. To run the unit tests, execute Helm Unit from -the Polaris repo root: -```bash -helm unittest helm/polaris -``` +## Requirements -You can also lint the chart using the Chart Testing tool, with the following command: +- Kubernetes 1.32+ cluster +- Helm 3.0+ -```bash -ct lint --charts helm/polaris -``` +## Features -### Running the integration tests +* Apache Iceberg REST catalog implementing the Iceberg REST specification +* Multi-engine interoperability for Spark, Trino, Flink, and other Iceberg-compatible engines +* Centralized security and governance with principals, roles, and fine-grained privileges +* Centralized catalog, namespace, and table management +* Kubernetes-native deployment with stateless services and horizontal scalability +* Production-ready observability with health checks and metrics +* Open source and vendor neutral, governed by the Apache Software Foundation Review Comment: I think it is more accurate to say that the project is governed by PPMC, something like this ``` Open source and vendor neutral, governed by the Apache Polaris PPMC under the Apache Software Foundation ``` -- 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]
