From 680baa3efdaa847776bf982a9a733ab952f7a264 Mon Sep 17 00:00:00 2001 From: RichardLiu2001 Date: Fri, 2 May 2025 10:31:48 -0700 Subject: [PATCH 1/2] add missing overrides --- helm/polaris/templates/configmap.yaml | 2 +- helm/polaris/tests/configmap_test.yaml | 4 ++-- quarkus/defaults/src/main/resources/application.properties | 4 ++-- site/content/in-dev/unreleased/configuration.md | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/helm/polaris/templates/configmap.yaml b/helm/polaris/templates/configmap.yaml index 58ba96c0b6..025757607f 100644 --- a/helm/polaris/templates/configmap.yaml +++ b/helm/polaris/templates/configmap.yaml @@ -41,7 +41,7 @@ data: {{- end -}} {{- range $realm, $overrides := .Values.features.realmOverrides -}} {{- range $k, $v := $overrides -}} - {{- $_ = set $map (printf "polaris.config.realm-overrides.\"%s\".\"%s\"" $realm $k) (toJson $v) -}} + {{- $_ = set $map (printf "polaris.config.realm-overrides.\"%s\".overrides.\"%s\"" $realm $k) (toJson $v) -}} {{- end -}} {{- end -}} diff --git a/helm/polaris/tests/configmap_test.yaml b/helm/polaris/tests/configmap_test.yaml index ef725ec4f3..5d2b7c700b 100644 --- a/helm/polaris/tests/configmap_test.yaml +++ b/helm/polaris/tests/configmap_test.yaml @@ -100,8 +100,8 @@ tests: asserts: - matchRegex: { path: 'data["application.properties"]', pattern: "polaris.features.defaults.\"feature1\"=true" } - matchRegex: { path: 'data["application.properties"]', pattern: "polaris.features.defaults.\"feature2\"=42" } - - matchRegex: { path: 'data["application.properties"]', pattern: "polaris.config.realm-overrides.\"realm1\".\"feature1\"=false" } - - matchRegex: { path: 'data["application.properties"]', pattern: "polaris.config.realm-overrides.\"realm2\".\"feature2\"=43" } + - matchRegex: { path: 'data["application.properties"]', pattern: "polaris.config.realm-overrides.\"realm1\".overrides.\"feature1\"=false" } + - matchRegex: { path: 'data["application.properties"]', pattern: "polaris.config.realm-overrides.\"realm2\".overrides.\"feature2\"=43" } - it: should configure persistence set: diff --git a/quarkus/defaults/src/main/resources/application.properties b/quarkus/defaults/src/main/resources/application.properties index d9b82239e3..65c5a31240 100644 --- a/quarkus/defaults/src/main/resources/application.properties +++ b/quarkus/defaults/src/main/resources/application.properties @@ -113,8 +113,8 @@ polaris.features.defaults."SUPPORTED_CATALOG_STORAGE_TYPES"=["S3","GCS","AZURE", # polaris.features.defaults."ENABLE_CATALOG_FEDERATION"=true # realm overrides -# polaris.features.realm-overrides."my-realm"."INITIALIZE_DEFAULT_CATALOG_FILEIO_FOR_TEST"=true -# polaris.features.realm-overrides."my-realm"."SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION"=true +# polaris.features.realm-overrides."my-realm".overrides."INITIALIZE_DEFAULT_CATALOG_FILEIO_FOR_TEST"=true +# polaris.features.realm-overrides."my-realm".overrides."SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION"=true # polaris.persistence.type=eclipse-link # polaris.persistence.type=in-memory-atomic diff --git a/site/content/in-dev/unreleased/configuration.md b/site/content/in-dev/unreleased/configuration.md index b0626da814..54ab06e5c3 100644 --- a/site/content/in-dev/unreleased/configuration.md +++ b/site/content/in-dev/unreleased/configuration.md @@ -87,8 +87,8 @@ read-only mode, as Polaris only reads the configuration file once, at startup. | `polaris.realm-context.header-name` | `Polaris-Realm` | Define the header name defining the realm context. | | `polaris.features.defaults."ENFORCE_PRINCIPAL_CREDENTIAL_ROTATION_REQUIRED_CHECKING"` | `false` | Flag to enforce check if credential rotation. | | `polaris.features.defaults."SUPPORTED_CATALOG_STORAGE_TYPES"` | `FILE` | Define the catalog supported storage. Supported values are `S3`, `GCS`, `AZURE`, `FILE`. | -| `polaris.features.realm-overrides."my-realm"."INITIALIZE_DEFAULT_CATALOG_FILEIO_FOR_TEST"` | `true` | "Override" realm features, here the catalog init default flag. | -| `polaris.features.realm-overrides."my-realm"."SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION"` | `true` | "Override" realm features, here the skip credential subscoping indirection flag. | +| `polaris.features.realm-overrides."my-realm".overrides."INITIALIZE_DEFAULT_CATALOG_FILEIO_FOR_TEST"` | `true` | "Override" realm features, here the catalog init default flag. | +| `polaris.features.realm-overrides."my-realm".overrides."SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION"` | `true` | "Override" realm features, here the skip credential subscoping indirection flag. | | `polaris.authentication.authenticator.type` | `default` | Define the Polaris authenticator type. | | `polaris.authentication.token-service.type` | `default` | Define the Polaris token service type. | | `polaris.authentication.token-broker.type` | `rsa-key-pair` | Define the Polaris token broker type. | From ed55358d6ddc7065e3741fff76a6d6a4b312894f Mon Sep 17 00:00:00 2001 From: RichardLiu2001 Date: Fri, 2 May 2025 10:37:56 -0700 Subject: [PATCH 2/2] use feature --- helm/polaris/templates/configmap.yaml | 2 +- helm/polaris/tests/configmap_test.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/helm/polaris/templates/configmap.yaml b/helm/polaris/templates/configmap.yaml index 025757607f..eafd8a7f39 100644 --- a/helm/polaris/templates/configmap.yaml +++ b/helm/polaris/templates/configmap.yaml @@ -41,7 +41,7 @@ data: {{- end -}} {{- range $realm, $overrides := .Values.features.realmOverrides -}} {{- range $k, $v := $overrides -}} - {{- $_ = set $map (printf "polaris.config.realm-overrides.\"%s\".overrides.\"%s\"" $realm $k) (toJson $v) -}} + {{- $_ = set $map (printf "polaris.features.realm-overrides.\"%s\".overrides.\"%s\"" $realm $k) (toJson $v) -}} {{- end -}} {{- end -}} diff --git a/helm/polaris/tests/configmap_test.yaml b/helm/polaris/tests/configmap_test.yaml index 5d2b7c700b..9d6e60cbfd 100644 --- a/helm/polaris/tests/configmap_test.yaml +++ b/helm/polaris/tests/configmap_test.yaml @@ -100,8 +100,8 @@ tests: asserts: - matchRegex: { path: 'data["application.properties"]', pattern: "polaris.features.defaults.\"feature1\"=true" } - matchRegex: { path: 'data["application.properties"]', pattern: "polaris.features.defaults.\"feature2\"=42" } - - matchRegex: { path: 'data["application.properties"]', pattern: "polaris.config.realm-overrides.\"realm1\".overrides.\"feature1\"=false" } - - matchRegex: { path: 'data["application.properties"]', pattern: "polaris.config.realm-overrides.\"realm2\".overrides.\"feature2\"=43" } + - matchRegex: { path: 'data["application.properties"]', pattern: "polaris.features.realm-overrides.\"realm1\".overrides.\"feature1\"=false" } + - matchRegex: { path: 'data["application.properties"]', pattern: "polaris.features.realm-overrides.\"realm2\".overrides.\"feature2\"=43" } - it: should configure persistence set: