dimas-b commented on code in PR #842: URL: https://github.com/apache/polaris/pull/842#discussion_r1925773495
########## site/content/in-dev/unreleased/configuration.md: ########## @@ -0,0 +1,127 @@ +--- +# +# 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 Apache Polaris (Incubating) +linkTitle: 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. +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, the environment variable is converted to a property name using a +special naming convention; e.g. `POLARIS_REALM_CONTEXT_REALMS` would match the +`polaris.realm-context.realms` property. The environment variable name is derived from the property +name by replacing all `.` with `_` and converting the name to upper case. See +[here](https://smallrye.io/smallrye-config/Main/config/environment-variables/) for more details. Review Comment: This is very risky in my experience. More advanced config (with maps and sub-types) does not always convert well to/from env. variables. Sooner or later someone will run into hard-to-debug issues on this path. From my POV, it is preferable to direct users towards mixed case env. variable names with dots and quotation marks (which are 1:1 with config names) and where it is not possible (e.g. `bash`) to use `application.properties` or `-D`. -- 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]
