flyrain commented on code in PR #1910:
URL: https://github.com/apache/polaris/pull/1910#discussion_r2155664740


##########
site/content/in-dev/1.0.0/configuration.md:
##########
@@ -0,0 +1,187 @@
+---
+#
+# 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: Configuring Polaris
+type: docs
+weight: 550
+---
+
+## Overview
+
+This page provides information on how to configure Apache Polaris 
(Incubating). Unless stated
+otherwise, this information is valid both for Polaris Docker images (and 
Kubernetes deployments) as
+well as for Polaris binary distributions.
+
+> Note: for Production tips and best practices, refer to [Configuring Polaris 
for Production]({{% ref "configuring-polaris-for-production.md" %}}).
+
+First off, Polaris server runs on Quarkus, and uses its configuration 
mechanisms. Read Quarkus
+[configuration guide](https://quarkus.io/guides/config) to get familiar with 
the basics.
+
+Quarkus aggregates configuration properties from multiple sources, applying 
them in a specific order
+of precedence. When a property is defined in multiple sources, the value from 
the source with the
+higher priority overrides those from lower-priority sources.
+
+The sources are listed below, from highest to lowest priority:
+
+1. System properties: properties set via the Java command line using 
`-Dproperty.name=value`.
+2. Environment variables (see below for important details).
+3. Settings in `$PWD/config/application.properties` file.
+4. The `application.properties` files packaged in Polaris.
+5. Default values: hardcoded defaults within the application.
+
+When using environment variables, there are two naming conventions:
+
+1. If possible, just use the property name as the environment variable name. 
This works fine in most
+   cases, e.g. in Kubernetes deployments. For example, 
`polaris.realm-context.realms` can be 
+   included as is in a container YAML definition:
+   ```yaml
+   env:
+   - name: "polaris.realm-context.realms"
+     value: "realm1,realm2"
+   ```
+
+2. If running from a script or shell prompt, however, stricter naming rules 
apply: variable names
+   can consist solely of uppercase letters, digits, and the `_` (underscore) 
sign. In such
+   situations, the environment variable name must be derived from the property 
name, by using
+   uppercase letters, and replacing all dots, dashes and quotes by 
underscores. For example,
+   `polaris.realm-context.realms` becomes `POLARIS_REALM_CONTEXT_REALMS`. See
+   
[here](https://smallrye.io/smallrye-config/Main/config/environment-variables/) 
for more details.
+
+> [!IMPORTANT]
+> While convenient, uppercase-only environment variables can be problematic 
for complex property
+> names. In these situations, it's preferable to use system properties or a 
configuration file.
+
+As stated above, a configuration file can also be provided at runtime; it 
should be available
+(mounted) at `$PWD/config/application.properties` for Polaris server to 
recognize it. In Polaris
+official Docker images, this location is 
`/deployment/config/application.properties`.
+
+For Kubernetes deployments, the configuration file is typically defined as a 
`ConfigMap`, then
+mounted in the container at `/deployment/config/application.properties`. It 
can be mounted in
+read-only mode, as Polaris only reads the configuration file once, at startup.
+
+## Polaris Configuration Options Reference
+
+| Configuration Property                                                       
          | Default Value         | Description                                 
                                                                                
                                                                                
       |
+|----------------------------------------------------------------------------------------|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `polaris.persistence.type`                                                   
          | `relational-jdbc`     | Define the persistence backend used by 
Polaris (`in-memory`, `relational-jdbc`, `eclipse-link` (deprecated)). See 
[Configuring Apache Polaris for Production)[{{% ref 
"configuring-polaris-for-production.md" %}}) | 
+| `polaris.persistence.relational.jdbc.max-retries`                            
          | `1`                   | Total number of retries JDBC persistence 
will attempt on connection resets or serialization failures before giving up.   
                                                                                
          |
+| `polaris.persistence.relational.jdbc.max_duaration_in_ms`                    
          | `5000 ms`             | Max time interval (ms) since the start of a 
transaction when retries can be attempted.                                      
                                                                                
       |

Review Comment:
   copilot did a good job to find typos! We should fix it in both places.



-- 
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: issues-unsubscr...@polaris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to