You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "adutra (via GitHub)" <gi...@apache.org> on 2025/01/08 13:58:58 UTC
[PR] [WIP] Helm chart redesign for Quarkus-based runtimes [polaris]
adutra opened a new pull request, #626:
URL: https://github.com/apache/polaris/pull/626
⚠️ Not ready for review yet!
Requires #469, #604 and #610.
This is a major redesign of the Helm chart to make it compliant with Quarkus, but also improving a lot of aspects of the existing chart, such as the persistence secret management and the bootstrap jobs, to name a few.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1937648402
##########
helm/polaris/templates/job.yaml:
##########
@@ -43,71 +43,89 @@ spec:
{{- tpl (toYaml .Values.podLabels) . | nindent 8 }}
{{- end }}
spec:
- {{- if and .Values.persistenceConfigSecret (index .Values.polarisServerConfig.metaStoreManager "conf-file") }}
- initContainers:
- - name: init-config
- image: "{{ tpl .Values.toolsImage.repository . }}:{{ tpl .Values.toolsImage.tag . }}"
- imagePullPolicy: {{ tpl .Values.toolsImage.pullPolicy . }}
- command: ["jar"]
- args: ["-cf", "/eclipselink-config/conf.jar", "-C", "/secret", "persistence.xml"]
- {{- if .Values.securityContext}}
- securityContext:
- {{- tpl (toYaml .Values.securityContext) . | nindent 12 }}
- {{- end }}
- volumeMounts:
- - name: eclipselink-config-volume
- mountPath: /eclipselink-config
- - name: secret-volume
- mountPath: /secret
- {{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.imagePullSecrets }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
serviceAccountName: {{ include "polaris.serviceAccountName" . }}
- {{- if .Values.podSecurityContext}}
+ {{- if .Values.podSecurityContext }}
securityContext:
{{- tpl (toYaml .Values.podSecurityContext) . | nindent 8 }}
{{- end }}
- containers:
- - name: {{ .Chart.Name }}
- {{- if .Values.securityContext}}
+ {{- if .Values.bootstrap.purge }}
+ initContainers:
+ - name: "polaris-purge"
+ {{- if .Values.containerSecurityContext }}
securityContext:
- {{- tpl (toYaml .Values.securityContext) . | nindent 12 }}
+ {{- tpl (toYaml .Values.containerSecurityContext) . | nindent 12 }}
{{- end }}
- image: "{{ tpl .Values.image.repository . }}:{{ tpl .Values.image.tag . | default .Chart.Version }}"
- imagePullPolicy: {{ tpl .Values.image.pullPolicy . }}
- command: ["/app/bin/polaris-service"]
- args: ["bootstrap", "/app/config/polaris-server.yml"]
- {{- if .Values.bootstrapExtraEnv }}
+ image: "{{ tpl .Values.bootstrap.image.repository . }}:{{ tpl .Values.bootstrap.image.tag . | default .Chart.Version }}"
+ imagePullPolicy: {{ tpl .Values.bootstrap.image.pullPolicy . }}
+ args:
+ - "purge"
+ {{- range $realm := .Values.bootstrap.realms }}
+ - --realm={{ tpl $realm $ }}
+ {{- end }}
env:
- {{- tpl (toYaml .Values.bootstrapExtraEnv) . | nindent 12 }}
- {{- end }}
+ {{- if .Values.bootstrap.extraEnv }}
+ {{- tpl (toYaml .Values.bootstrap.extraEnv) . | nindent 12 }}
+ {{- end }}
+ - name: "quarkus.log.file.enable"
+ value: "false"
volumeMounts:
- name: config-volume
- mountPath: /app/config/polaris-server.yml
- subPath: polaris-server.yml
- {{- if and .Values.persistenceConfigSecret (index .Values.polarisServerConfig.metaStoreManager "conf-file") }}
- - name: eclipselink-config-volume
- mountPath: /eclipselink-config
+ mountPath: {{ trimSuffix "/" .Values.bootstrap.image.configDir }}
+ readOnly: true
+ - name: temp-dir
+ mountPath: /tmp
+ readOnly: false
+ {{- if .Values.resources }}
+ resources:
+ {{- tpl (toYaml .Values.resources) . | nindent 12 }}
+ {{- end }}
+ {{- end }}
+ containers:
+ - name: "polaris-bootstrap"
Review Comment:
I fully agree – but are you OK dropping a feature that existed so far?
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1939434338
##########
helm/polaris/templates/job.yaml:
##########
@@ -43,71 +43,89 @@ spec:
{{- tpl (toYaml .Values.podLabels) . | nindent 8 }}
{{- end }}
spec:
- {{- if and .Values.persistenceConfigSecret (index .Values.polarisServerConfig.metaStoreManager "conf-file") }}
- initContainers:
- - name: init-config
- image: "{{ tpl .Values.toolsImage.repository . }}:{{ tpl .Values.toolsImage.tag . }}"
- imagePullPolicy: {{ tpl .Values.toolsImage.pullPolicy . }}
- command: ["jar"]
- args: ["-cf", "/eclipselink-config/conf.jar", "-C", "/secret", "persistence.xml"]
- {{- if .Values.securityContext}}
- securityContext:
- {{- tpl (toYaml .Values.securityContext) . | nindent 12 }}
- {{- end }}
- volumeMounts:
- - name: eclipselink-config-volume
- mountPath: /eclipselink-config
- - name: secret-volume
- mountPath: /secret
- {{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.imagePullSecrets }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
serviceAccountName: {{ include "polaris.serviceAccountName" . }}
- {{- if .Values.podSecurityContext}}
+ {{- if .Values.podSecurityContext }}
securityContext:
{{- tpl (toYaml .Values.podSecurityContext) . | nindent 8 }}
{{- end }}
- containers:
- - name: {{ .Chart.Name }}
- {{- if .Values.securityContext}}
+ {{- if .Values.bootstrap.purge }}
+ initContainers:
+ - name: "polaris-purge"
+ {{- if .Values.containerSecurityContext }}
securityContext:
- {{- tpl (toYaml .Values.securityContext) . | nindent 12 }}
+ {{- tpl (toYaml .Values.containerSecurityContext) . | nindent 12 }}
{{- end }}
- image: "{{ tpl .Values.image.repository . }}:{{ tpl .Values.image.tag . | default .Chart.Version }}"
- imagePullPolicy: {{ tpl .Values.image.pullPolicy . }}
- command: ["/app/bin/polaris-service"]
- args: ["bootstrap", "/app/config/polaris-server.yml"]
- {{- if .Values.bootstrapExtraEnv }}
+ image: "{{ tpl .Values.bootstrap.image.repository . }}:{{ tpl .Values.bootstrap.image.tag . | default .Chart.Version }}"
+ imagePullPolicy: {{ tpl .Values.bootstrap.image.pullPolicy . }}
+ args:
+ - "purge"
+ {{- range $realm := .Values.bootstrap.realms }}
+ - --realm={{ tpl $realm $ }}
+ {{- end }}
env:
- {{- tpl (toYaml .Values.bootstrapExtraEnv) . | nindent 12 }}
- {{- end }}
+ {{- if .Values.bootstrap.extraEnv }}
+ {{- tpl (toYaml .Values.bootstrap.extraEnv) . | nindent 12 }}
+ {{- end }}
+ - name: "quarkus.log.file.enable"
+ value: "false"
volumeMounts:
- name: config-volume
- mountPath: /app/config/polaris-server.yml
- subPath: polaris-server.yml
- {{- if and .Values.persistenceConfigSecret (index .Values.polarisServerConfig.metaStoreManager "conf-file") }}
- - name: eclipselink-config-volume
- mountPath: /eclipselink-config
+ mountPath: {{ trimSuffix "/" .Values.bootstrap.image.configDir }}
+ readOnly: true
+ - name: temp-dir
+ mountPath: /tmp
+ readOnly: false
+ {{- if .Values.resources }}
+ resources:
+ {{- tpl (toYaml .Values.resources) . | nindent 12 }}
+ {{- end }}
+ {{- end }}
+ containers:
+ - name: "polaris-bootstrap"
Review Comment:
Okay job removed!
##########
helm/polaris/values.yaml:
##########
@@ -28,14 +28,9 @@ image:
pullPolicy: IfNotPresent
# -- The image tag.
tag: "latest"
-
-toolsImage:
- # -- The image repository to pull from (must have jar binary included).
- repository: registry.access.redhat.com/ubi9/openjdk-21
- # -- The image pull policy.
- pullPolicy: IfNotPresent
- # -- The image tag.
- tag: "latest"
+ # -- The path to the directory where the application.properties file, and other configuration
+ # files, if any, should be mounted.
+ configDir: /deployments/config
Review Comment:
Good point, done
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1930226312
##########
.github/workflows/helm.yml:
##########
@@ -99,7 +99,7 @@ jobs:
if: steps.list-changed.outputs.changed == 'true'
run: |
eval $(minikube -p minikube docker-env)
- ./gradlew :polaris-quarkus-server:assemble \
+ ./gradlew :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
-Dquarkus.container-image.build=true \
-PeclipseLinkDeps=com.h2database:h2:2.3.232
Review Comment:
Also, H2 will not work either because it's in-memory.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1930376671
##########
.github/workflows/helm.yml:
##########
@@ -99,7 +99,7 @@ jobs:
if: steps.list-changed.outputs.changed == 'true'
run: |
eval $(minikube -p minikube docker-env)
- ./gradlew :polaris-quarkus-server:assemble \
+ ./gradlew :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
-Dquarkus.container-image.build=true \
-PeclipseLinkDeps=com.h2database:h2:2.3.232
Review Comment:
@MonkeyCanCode I think we should switch our tests to use Postgres, wdyt? H2 won't give us a "real" experience and bootstrapping will be broken.
I just tested with postgres and the bootstrap job worked and I was able to connect to Polaris after.
The only annoying thing is that we will need support for purge as well. I will try to add that too.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1939425075
##########
helm/polaris/ci/fixtures/persistence.yaml:
##########
@@ -38,9 +38,10 @@ stringData:
<class>org.apache.polaris.jpa.models.ModelSequenceId</class>
<shared-cache-mode>NONE</shared-cache-mode>
<properties>
- <property name="jakarta.persistence.jdbc.url" value="jdbc:h2:mem:polaris-{realm}"/>
- <property name="jakarta.persistence.jdbc.user" value="sa"/>
- <property name="jakarta.persistence.jdbc.password" value=""/>
+ <property name="jakarta.persistence.jdbc.url"
Review Comment:
Good point. I added the following:
```
<property name="eclipselink.connection-pool.default.initial" value="1" />
<property name="eclipselink.connection-pool.default.min" value="1" />
<property name="eclipselink.connection-pool.default.max" value="1" />
```
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1939418089
##########
.github/workflows/helm.yml:
##########
@@ -79,7 +79,7 @@ jobs:
if: steps.list-changed.outputs.changed == 'true'
run: |
helm plugin install https://github.com/helm-unittest/helm-unittest.git || true
- helm unittest helm/polaris
+ helm unittest helm/polaris 2> >(grep -v 'found symbolic link' >&2)
Review Comment:
Yes! I'm just waiting for #912 to be merged.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra merged PR #626:
URL: https://github.com/apache/polaris/pull/626
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "gh-yzou (via GitHub)" <gi...@apache.org>.
gh-yzou commented on PR #626:
URL: https://github.com/apache/polaris/pull/626#issuecomment-2643645595
@adutra i don't have other further questions, but i am not familiar with this part, so I will let @MonkeyCanCode and @collado-mike to do the final approval on this. Please do not blocked on me.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1928957544
##########
helm/polaris/README.md:
##########
@@ -45,41 +45,105 @@ A Helm chart for Polaris.
### Optional
-When using a custom `persistence.xml`, a Kubernetes Secret must be created for `.persistenceConfigSecret`. Below is a sample command:
+When using a custom `persistence.xml`, a Kubernetes Secret must be created for it. Below is a sample command:
```bash
kubectl create secret generic polaris-secret -n polaris --from-file=persistence.xml
```
### From local directory (for development purposes)
-From Polaris repo root:
+The below instructions assume Minikube is running and Helm is installed.
+
+If necessary, load the Docker images into Minikube:
+
+```bash
+eval $(minikube -p minikube docker-env)
+
+./gradlew :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
+ -Dquarkus.container-image.build=true \
+ -Dquarkus.container-image.tag=unstable \
+ -PeclipseLinkDeps=com.h2database:h2:2.3.232
+```
+
+Then create and populate the namespace:
+
+```bash
+kubectl create namespace polaris
+kubectl apply --namespace polaris -f helm/polaris/ci/fixtures/
+```
+
+Finally, install the chart. From Polaris repo root:
+
+```bash
+helm upgrade --install --namespace polaris polaris helm/polaris \
+ --set image.tag=unstable \
+ --set bootstrap.image.tag=unstable \
+ --debug \
+ --values helm/polaris/ci/simple-values.yaml
+```
+
+You can also run `ct` (chart-testing):
```bash
-$ helm install polaris helm/polaris --namespace polaris --create-namespace
+ct lint --charts helm/polaris
+ct install --helm-extra-set-args "--set=image.tag=unstable --set bootstrap.image.tag=unstable" \
+ --debug \
+ --namespace polaris \
+ --charts ./helm/polaris
```
### Uninstalling the chart
```bash
-$ helm uninstall --namespace polaris polaris
+helm uninstall --namespace polaris polaris
```
## Values
Review Comment:
Note: this is automatically generated by `helm-docs`.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1930309191
##########
helm/polaris/README.md:
##########
@@ -45,41 +45,105 @@ A Helm chart for Polaris.
### Optional
-When using a custom `persistence.xml`, a Kubernetes Secret must be created for `.persistenceConfigSecret`. Below is a sample command:
+When using a custom `persistence.xml`, a Kubernetes Secret must be created for it. Below is a sample command:
```bash
kubectl create secret generic polaris-secret -n polaris --from-file=persistence.xml
```
### From local directory (for development purposes)
-From Polaris repo root:
+The below instructions assume Minikube is running and Helm is installed.
+
+If necessary, load the Docker images into Minikube:
+
+```bash
+eval $(minikube -p minikube docker-env)
Review Comment:
Ah that's true. Well, let's mention both! I will add a note about Kind.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "collado-mike (via GitHub)" <gi...@apache.org>.
collado-mike commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1937641536
##########
helm/polaris/templates/job.yaml:
##########
@@ -43,71 +43,89 @@ spec:
{{- tpl (toYaml .Values.podLabels) . | nindent 8 }}
{{- end }}
spec:
- {{- if and .Values.persistenceConfigSecret (index .Values.polarisServerConfig.metaStoreManager "conf-file") }}
- initContainers:
- - name: init-config
- image: "{{ tpl .Values.toolsImage.repository . }}:{{ tpl .Values.toolsImage.tag . }}"
- imagePullPolicy: {{ tpl .Values.toolsImage.pullPolicy . }}
- command: ["jar"]
- args: ["-cf", "/eclipselink-config/conf.jar", "-C", "/secret", "persistence.xml"]
- {{- if .Values.securityContext}}
- securityContext:
- {{- tpl (toYaml .Values.securityContext) . | nindent 12 }}
- {{- end }}
- volumeMounts:
- - name: eclipselink-config-volume
- mountPath: /eclipselink-config
- - name: secret-volume
- mountPath: /secret
- {{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.imagePullSecrets }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
serviceAccountName: {{ include "polaris.serviceAccountName" . }}
- {{- if .Values.podSecurityContext}}
+ {{- if .Values.podSecurityContext }}
securityContext:
{{- tpl (toYaml .Values.podSecurityContext) . | nindent 8 }}
{{- end }}
- containers:
- - name: {{ .Chart.Name }}
- {{- if .Values.securityContext}}
+ {{- if .Values.bootstrap.purge }}
+ initContainers:
+ - name: "polaris-purge"
+ {{- if .Values.containerSecurityContext }}
securityContext:
- {{- tpl (toYaml .Values.securityContext) . | nindent 12 }}
+ {{- tpl (toYaml .Values.containerSecurityContext) . | nindent 12 }}
{{- end }}
- image: "{{ tpl .Values.image.repository . }}:{{ tpl .Values.image.tag . | default .Chart.Version }}"
- imagePullPolicy: {{ tpl .Values.image.pullPolicy . }}
- command: ["/app/bin/polaris-service"]
- args: ["bootstrap", "/app/config/polaris-server.yml"]
- {{- if .Values.bootstrapExtraEnv }}
+ image: "{{ tpl .Values.bootstrap.image.repository . }}:{{ tpl .Values.bootstrap.image.tag . | default .Chart.Version }}"
+ imagePullPolicy: {{ tpl .Values.bootstrap.image.pullPolicy . }}
+ args:
+ - "purge"
+ {{- range $realm := .Values.bootstrap.realms }}
+ - --realm={{ tpl $realm $ }}
+ {{- end }}
env:
- {{- tpl (toYaml .Values.bootstrapExtraEnv) . | nindent 12 }}
- {{- end }}
+ {{- if .Values.bootstrap.extraEnv }}
+ {{- tpl (toYaml .Values.bootstrap.extraEnv) . | nindent 12 }}
+ {{- end }}
+ - name: "quarkus.log.file.enable"
+ value: "false"
volumeMounts:
- name: config-volume
- mountPath: /app/config/polaris-server.yml
- subPath: polaris-server.yml
- {{- if and .Values.persistenceConfigSecret (index .Values.polarisServerConfig.metaStoreManager "conf-file") }}
- - name: eclipselink-config-volume
- mountPath: /eclipselink-config
+ mountPath: {{ trimSuffix "/" .Values.bootstrap.image.configDir }}
+ readOnly: true
+ - name: temp-dir
+ mountPath: /tmp
+ readOnly: false
+ {{- if .Values.resources }}
+ resources:
+ {{- tpl (toYaml .Values.resources) . | nindent 12 }}
+ {{- end }}
+ {{- end }}
+ containers:
+ - name: "polaris-bootstrap"
Review Comment:
I just want to go on record as saying I think a bootstrap container is a bad idea. Bootstrapping is the kind of activity that ought to be invoked manually by a person in most scenarios - or at the most by a terraform process that sets up a region for the very first time. I worry that a k8s job could be misconfigured and accidentally purge a deployment during a release. It feels to me like one of those "don't leave a loaded gun in the drawer" scenarios.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1944570663
##########
helm/polaris/ci/fixtures/token-broker.yaml:
##########
@@ -0,0 +1,59 @@
+#
+# 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: Secret
+metadata:
+ name: polaris-token-broker
+type: Opaque
+stringData:
+ private.pem: |-
+ -----BEGIN PRIVATE KEY-----
+ MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDiae5jQnQ+Dt8Optpa4fLNuUfI
Review Comment:
This is just for tests. They were randomly generated and do not contain any sensitive information. I will add a comment.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1944583098
##########
helm/polaris/ci/extra-service-values.yaml:
##########
@@ -0,0 +1,47 @@
+#
+# 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.
+#
+
+image:
+ pullPolicy: Never
+
+service:
+ type: ClusterIP
+ sessionAffinity: ClientIP
+ internalTrafficPolicy: Cluster
+ externalTrafficPolicy: Cluster
+ ports:
+ - name: polaris-http
Review Comment:
This file is just for tests and contains "bogus" data that does not necessarily reflect how `extraServices` will be used in real life, because in these tests we cannot create load balancers, ingresses, etc.
The typical use case for `extraServices` is:
- User wants port 8181 to be exposed to internal clients (in the same namespace) using a `ClusterIP` service.
- User also wants to expose port 8181 using a `LoadBalancer` service, for consumption by external clients (potentially with TLS termination, etc.)
This can be achieved by simply leaving `service` and `managementService` untouched, and adding the following config:
```yaml
extraServices:
- nameSuffix: "ext"
type: LoadBalancer
ports:
- name: polaris-http
port: 8181
```
Assuming the release name is `my-release`, the above will generate the following services:
* `my-release` of type ClusterIP for port 8181;
* `my-release-ext` of type LoadBalancer for port 8181;
* `my-release-mgmt` service of type ClusterIP (headless) for port 8182.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1938615680
##########
.github/workflows/helm.yml:
##########
@@ -79,7 +79,7 @@ jobs:
if: steps.list-changed.outputs.changed == 'true'
run: |
helm plugin install https://github.com/helm-unittest/helm-unittest.git || true
- helm unittest helm/polaris
+ helm unittest helm/polaris 2> >(grep -v 'found symbolic link' >&2)
Review Comment:
With https://github.com/apache/polaris/pull/912/files, we will need only the original command without filter out the warning messages due to symbolic link.
##########
.github/workflows/helm.yml:
##########
@@ -79,7 +79,7 @@ jobs:
if: steps.list-changed.outputs.changed == 'true'
run: |
helm plugin install https://github.com/helm-unittest/helm-unittest.git || true
- helm unittest helm/polaris
+ helm unittest helm/polaris 2> >(grep -v 'found symbolic link' >&2)
Review Comment:
With https://github.com/apache/polaris/pull/912/files, we will need only the original command without filter out the warning messages due to symbolic link.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1938266709
##########
helm/polaris/templates/job.yaml:
##########
@@ -43,71 +43,89 @@ spec:
{{- tpl (toYaml .Values.podLabels) . | nindent 8 }}
{{- end }}
spec:
- {{- if and .Values.persistenceConfigSecret (index .Values.polarisServerConfig.metaStoreManager "conf-file") }}
- initContainers:
- - name: init-config
- image: "{{ tpl .Values.toolsImage.repository . }}:{{ tpl .Values.toolsImage.tag . }}"
- imagePullPolicy: {{ tpl .Values.toolsImage.pullPolicy . }}
- command: ["jar"]
- args: ["-cf", "/eclipselink-config/conf.jar", "-C", "/secret", "persistence.xml"]
- {{- if .Values.securityContext}}
- securityContext:
- {{- tpl (toYaml .Values.securityContext) . | nindent 12 }}
- {{- end }}
- volumeMounts:
- - name: eclipselink-config-volume
- mountPath: /eclipselink-config
- - name: secret-volume
- mountPath: /secret
- {{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.imagePullSecrets }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
serviceAccountName: {{ include "polaris.serviceAccountName" . }}
- {{- if .Values.podSecurityContext}}
+ {{- if .Values.podSecurityContext }}
securityContext:
{{- tpl (toYaml .Values.podSecurityContext) . | nindent 8 }}
{{- end }}
- containers:
- - name: {{ .Chart.Name }}
- {{- if .Values.securityContext}}
+ {{- if .Values.bootstrap.purge }}
+ initContainers:
+ - name: "polaris-purge"
+ {{- if .Values.containerSecurityContext }}
securityContext:
- {{- tpl (toYaml .Values.securityContext) . | nindent 12 }}
+ {{- tpl (toYaml .Values.containerSecurityContext) . | nindent 12 }}
{{- end }}
- image: "{{ tpl .Values.image.repository . }}:{{ tpl .Values.image.tag . | default .Chart.Version }}"
- imagePullPolicy: {{ tpl .Values.image.pullPolicy . }}
- command: ["/app/bin/polaris-service"]
- args: ["bootstrap", "/app/config/polaris-server.yml"]
- {{- if .Values.bootstrapExtraEnv }}
+ image: "{{ tpl .Values.bootstrap.image.repository . }}:{{ tpl .Values.bootstrap.image.tag . | default .Chart.Version }}"
+ imagePullPolicy: {{ tpl .Values.bootstrap.image.pullPolicy . }}
+ args:
+ - "purge"
+ {{- range $realm := .Values.bootstrap.realms }}
+ - --realm={{ tpl $realm $ }}
+ {{- end }}
env:
- {{- tpl (toYaml .Values.bootstrapExtraEnv) . | nindent 12 }}
- {{- end }}
+ {{- if .Values.bootstrap.extraEnv }}
+ {{- tpl (toYaml .Values.bootstrap.extraEnv) . | nindent 12 }}
+ {{- end }}
+ - name: "quarkus.log.file.enable"
+ value: "false"
volumeMounts:
- name: config-volume
- mountPath: /app/config/polaris-server.yml
- subPath: polaris-server.yml
- {{- if and .Values.persistenceConfigSecret (index .Values.polarisServerConfig.metaStoreManager "conf-file") }}
- - name: eclipselink-config-volume
- mountPath: /eclipselink-config
+ mountPath: {{ trimSuffix "/" .Values.bootstrap.image.configDir }}
+ readOnly: true
+ - name: temp-dir
+ mountPath: /tmp
+ readOnly: false
+ {{- if .Values.resources }}
+ resources:
+ {{- tpl (toYaml .Values.resources) . | nindent 12 }}
+ {{- end }}
+ {{- end }}
+ containers:
+ - name: "polaris-bootstrap"
Review Comment:
I'm going to remove support for purge – that is new, and indeed sounds too risky. Not a good idea after all.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1938610656
##########
helm/polaris/templates/job.yaml:
##########
@@ -43,71 +43,89 @@ spec:
{{- tpl (toYaml .Values.podLabels) . | nindent 8 }}
{{- end }}
spec:
- {{- if and .Values.persistenceConfigSecret (index .Values.polarisServerConfig.metaStoreManager "conf-file") }}
- initContainers:
- - name: init-config
- image: "{{ tpl .Values.toolsImage.repository . }}:{{ tpl .Values.toolsImage.tag . }}"
- imagePullPolicy: {{ tpl .Values.toolsImage.pullPolicy . }}
- command: ["jar"]
- args: ["-cf", "/eclipselink-config/conf.jar", "-C", "/secret", "persistence.xml"]
- {{- if .Values.securityContext}}
- securityContext:
- {{- tpl (toYaml .Values.securityContext) . | nindent 12 }}
- {{- end }}
- volumeMounts:
- - name: eclipselink-config-volume
- mountPath: /eclipselink-config
- - name: secret-volume
- mountPath: /secret
- {{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.imagePullSecrets }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
serviceAccountName: {{ include "polaris.serviceAccountName" . }}
- {{- if .Values.podSecurityContext}}
+ {{- if .Values.podSecurityContext }}
securityContext:
{{- tpl (toYaml .Values.podSecurityContext) . | nindent 8 }}
{{- end }}
- containers:
- - name: {{ .Chart.Name }}
- {{- if .Values.securityContext}}
+ {{- if .Values.bootstrap.purge }}
+ initContainers:
+ - name: "polaris-purge"
+ {{- if .Values.containerSecurityContext }}
securityContext:
- {{- tpl (toYaml .Values.securityContext) . | nindent 12 }}
+ {{- tpl (toYaml .Values.containerSecurityContext) . | nindent 12 }}
{{- end }}
- image: "{{ tpl .Values.image.repository . }}:{{ tpl .Values.image.tag . | default .Chart.Version }}"
- imagePullPolicy: {{ tpl .Values.image.pullPolicy . }}
- command: ["/app/bin/polaris-service"]
- args: ["bootstrap", "/app/config/polaris-server.yml"]
- {{- if .Values.bootstrapExtraEnv }}
+ image: "{{ tpl .Values.bootstrap.image.repository . }}:{{ tpl .Values.bootstrap.image.tag . | default .Chart.Version }}"
+ imagePullPolicy: {{ tpl .Values.bootstrap.image.pullPolicy . }}
+ args:
+ - "purge"
+ {{- range $realm := .Values.bootstrap.realms }}
+ - --realm={{ tpl $realm $ }}
+ {{- end }}
env:
- {{- tpl (toYaml .Values.bootstrapExtraEnv) . | nindent 12 }}
- {{- end }}
+ {{- if .Values.bootstrap.extraEnv }}
+ {{- tpl (toYaml .Values.bootstrap.extraEnv) . | nindent 12 }}
+ {{- end }}
+ - name: "quarkus.log.file.enable"
+ value: "false"
volumeMounts:
- name: config-volume
- mountPath: /app/config/polaris-server.yml
- subPath: polaris-server.yml
- {{- if and .Values.persistenceConfigSecret (index .Values.polarisServerConfig.metaStoreManager "conf-file") }}
- - name: eclipselink-config-volume
- mountPath: /eclipselink-config
+ mountPath: {{ trimSuffix "/" .Values.bootstrap.image.configDir }}
+ readOnly: true
+ - name: temp-dir
+ mountPath: /tmp
+ readOnly: false
+ {{- if .Values.resources }}
+ resources:
+ {{- tpl (toYaml .Values.resources) . | nindent 12 }}
+ {{- end }}
+ {{- end }}
+ containers:
+ - name: "polaris-bootstrap"
Review Comment:
Yes, I think that is fine too. May be better drop the support now before the first release as oppose to later. I added bootstrap earlier as part of helm as there was no different tool available for this and we had to packaged the service config as part of the service binary (thinking about having different binary for diff environments and bootstrap those manually will be really tedious). Now as we have a dedicated tool for it, I also think it is a good idea to drop this.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1930222896
##########
.github/workflows/helm.yml:
##########
@@ -99,7 +99,7 @@ jobs:
if: steps.list-changed.outputs.changed == 'true'
run: |
eval $(minikube -p minikube docker-env)
- ./gradlew :polaris-quarkus-server:assemble \
+ ./gradlew :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
-Dquarkus.container-image.build=true \
-PeclipseLinkDeps=com.h2database:h2:2.3.232
Review Comment:
Are you using in-memory persistence? Because with in-memory it won't work indeed. The bootstrap job can only be used with EclipseLink.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on PR #626:
URL: https://github.com/apache/polaris/pull/626#issuecomment-2643031427
@MonkeyCanCode @gh-yzou should we move forward with this? I would suggest to merge unless you see any blockers, then we can always keep improving the chart after the merge. It's not like we are going to do a release of the chart any time soon 😄
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on PR #626:
URL: https://github.com/apache/polaris/pull/626#issuecomment-2650724659
Heads up: I am going to merge this now to unblock people looking for node port support, see #982.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1930657489
##########
helm/polaris/templates/tests/test-connection.yaml:
##########
@@ -35,5 +35,7 @@ spec:
- name: wget
image: busybox
command: ['wget']
- args: ['{{ include "polaris.fullname" . }}:{{ index .Values.service.ports "polaris-metrics" }}/q/health']
+ args:
+ - --spider
+ - '{{ include "polaris.fullnameWithSuffix" (list . "mgmt") }}:{{ get (first .Values.managementService.ports) "port" }}/q/health/ready'
restartPolicy: Never
Review Comment:
Yes, that will be good. Yeah, on my setup it was taking 6-7 seconds somehow. But yeah, good to add some retry etc.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1944568922
##########
helm/polaris/ci/fixtures/persistence.yaml:
##########
@@ -38,13 +38,17 @@ stringData:
<class>org.apache.polaris.jpa.models.ModelSequenceId</class>
<shared-cache-mode>NONE</shared-cache-mode>
<properties>
- <property name="jakarta.persistence.jdbc.url" value="jdbc:h2:mem:polaris-{realm}"/>
- <property name="jakarta.persistence.jdbc.user" value="sa"/>
- <property name="jakarta.persistence.jdbc.password" value=""/>
+ <property name="jakarta.persistence.jdbc.url"
+ value="jdbc:postgresql://postgres:5432/{realm}"/>
+ <property name="jakarta.persistence.jdbc.user" value="postgres"/>
+ <property name="jakarta.persistence.jdbc.password" value="postgres"/>
<property name="jakarta.persistence.schema-generation.database.action" value="create"/>
<property name="eclipselink.logging.level.sql" value="FINE"/>
<property name="eclipselink.logging.parameters" value="true"/>
<property name="eclipselink.persistence-context.flush-mode" value="auto"/>
+ <property name="eclipselink.connection-pool.default.initial" value="1" />
Review Comment:
This is only for CI tests.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1944583098
##########
helm/polaris/ci/extra-service-values.yaml:
##########
@@ -0,0 +1,47 @@
+#
+# 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.
+#
+
+image:
+ pullPolicy: Never
+
+service:
+ type: ClusterIP
+ sessionAffinity: ClientIP
+ internalTrafficPolicy: Cluster
+ externalTrafficPolicy: Cluster
+ ports:
+ - name: polaris-http
Review Comment:
This file is just for tests and contains "bogus" data that does not necessarily reflect how `extraServices` will be used in real life, because in these tests we cannot create load balancers, ingresses, etc.
The typical use case for `extraServices` is:
- User wants port 8181 to be exposed to internal clients (in the same namespace) using a `ClusterIP` service.
- User also wants to expose port 8181 using a `LoadBalancer` service, for consumption by external clients (potentially with TLS termination, etc.)
This can be achieved as follows:
```yaml
service:
type: ClusterIP
ports:
- name: polaris-http
port: 8181
extraServices:
- nameSuffix: "ext"
type: LoadBalancer
ports:
- name: polaris-http
port: 8181
```
Assuming the release name is `my-release`, the above will generate the following services:
* `my-release` of type ClusterIP for port 8181;
* `my-release-ext` of type LoadBalancer for port 8181;
* it will also generate a `my-release-mgmt` service of type ClusterIP (headless) for port 8182.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1929932037
##########
helm/polaris/templates/deployment.yaml:
##########
@@ -77,36 +60,67 @@ spec:
securityContext:
{{- tpl (toYaml .Values.podSecurityContext) . | nindent 8 }}
{{- end }}
+ {{- if .Values.extraInitContainers }}
+ initContainers:
+ {{- tpl (toYaml .Values.extraInitContainers) . | nindent 8 }}
+ {{- end }}
containers:
- name: {{ .Chart.Name }}
- {{- if .Values.securityContext}}
+ {{- if .Values.containerSecurityContext }}
securityContext:
- {{- tpl (toYaml .Values.securityContext) . | nindent 12 }}
+ {{- tpl (toYaml .Values.containerSecurityContext) . | nindent 12 }}
{{- end }}
image: "{{ tpl .Values.image.repository . }}:{{ tpl .Values.image.tag . | default .Chart.Version }}"
imagePullPolicy: {{ tpl .Values.image.pullPolicy . }}
- {{- if .Values.extraEnv }}
+ {{- if or .Values.storage.secret.name .Values.extraEnv }}
env:
+ {{- if .Values.storage.secret.name }}
Review Comment:
Maybe use a helper function for secret to env?
##########
helm/polaris/templates/_helpers.tpl:
##########
@@ -79,3 +102,198 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
+
+{{/*
+Merges the advanced configuration into the destination map.
+*/}}
+{{- define "polaris.mergeAdvancedConfig" -}}
+{{- $advConfig := index . 0 -}}
+{{- $prefix := index . 1 -}}
+{{- $dest := index . 2 -}}
+{{- range $key, $val := $advConfig -}}
+{{- $name := ternary $key (print $prefix "." $key) (eq $prefix "") -}}
+{{- if kindOf $val | eq "map" -}}
+{{- list $val $name $dest | include "polaris.mergeAdvancedConfig" -}}
+{{- else -}}
+{{- $_ := set $dest $name $val -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Prints the configuration option to the destination configmap entry. See confimap.yaml.
+Any nil values will be printed as empty config options; otherwise, the value will be evaluated
+as a template against the global context, then printed. Furthermore, if the value contains
+line breaks, they will be escaped and a multi-line option will be printed.
+*/}}
+{{- define "polaris.appendConfigOption" -}}
+{{- $key := index . 0 -}}
+{{- $value := index . 1 -}}
+{{- $global := index . 2 -}}
+{{- $valAsString := "" -}}
+{{- if ne $value nil -}}
+{{- $valAsString = tpl (toString $value) $global -}}
+{{- if contains "\r\n" $valAsString -}}
+{{- $valAsString = $valAsString | nindent 4 | replace "\r\n" "\\\r\n" -}}
+{{- else if contains "\n" $valAsString -}}
+{{- $valAsString = $valAsString | nindent 4 | replace "\n" "\\\n" -}}
+{{- end -}}
+{{- end -}}
+{{ print $key "=" $valAsString }}
+{{- end -}}
+
+{{/*
+Convert a dict into a string formed by a comma-separated list of key-value pairs: key1=value1,key2=value2, ...
+*/}}
+{{- define "polaris.dictToString" -}}
+{{- $list := list -}}
+{{- range $k, $v := . -}}
+{{- $list = append $list (printf "%s=%s" $k $v) -}}
+{{- end -}}
+{{ join "," $list }}
+{{- end -}}
+
+{{/*
+Prints the config volume definition for deployments and jobs.
+*/}}
+{{- define "polaris.configVolume" -}}
+- name: config-volume
+ projected:
+ sources:
+ - configMap:
+ name: {{ include "polaris.fullname" . }}
+ items:
+ - key: application.properties
+ path: application.properties
+ {{- if .Values.authentication.tokenBroker.secret.name }}
+ - secret:
+ name: {{ tpl .Values.authentication.tokenBroker.secret.name . }}
+ items:
+ {{- if eq .Values.authentication.tokenBroker.type "rsa-key-pair" }}
+ - key: {{ tpl .Values.authentication.tokenBroker.secret.publicKey . }}
+ path: public.pem
+ - key: {{ tpl .Values.authentication.tokenBroker.secret.privateKey . }}
+ path: private.pem
+ {{- end }}
+ {{- if eq .Values.authentication.tokenBroker.type "symmetric-key" }}
+ - key: {{ tpl .Values.authentication.tokenBroker.secret.secretKey . }}
+ path: symmetric.key
+ {{- end }}
+ {{- end }}
+ {{- if and ( eq .Values.persistence.type "eclipse-link" ) .Values.persistence.eclipseLink.secret.name }}
+ - secret:
+ name: {{ tpl .Values.persistence.eclipseLink.secret.name . }}
+ items:
+ - key: {{ tpl .Values.persistence.eclipseLink.secret.key . }}
+ path: persistence.xml
+ {{- end }}
+{{- end -}}
+
+{{/*
+Converts a Kubernetes quantity to a number (int64 if possible or float64 otherwise).
+It handles raw numbers as well as quantities with suffixes
+like m, k, M, G, T, P, E, ki, Mi, Gi, Ti, Pi, Ei.
+It also handles scientific notation.
+Quantities should be positive, so negative values, zero, or any unparseable number
+will result in a failure.
+https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/
+*/}}
+{{- define "polaris.quantity" -}}
+{{- $quantity := . -}}
+{{- $n := $quantity | float64 -}}
+{{- if kindIs "string" $quantity -}}
+{{- if hasSuffix "m" $quantity -}}
+{{- $n = divf (trimSuffix "m" $quantity | float64) 1000.0 -}}
+{{- else if hasSuffix "k" $quantity -}}
+{{- $n = trimSuffix "k" $quantity | int64 | mul 1000 -}}
+{{- else if hasSuffix "M" $quantity -}}
+{{- $n = trimSuffix "M" $quantity | int64 | mul 1000000 -}}
+{{- else if hasSuffix "G" $quantity -}}
+{{- $n = trimSuffix "G" $quantity | int64 | mul 1000000000 -}}
+{{- else if hasSuffix "T" $quantity -}}
+{{- $n = trimSuffix "T" $quantity | int64 | mul 1000000000000 -}}
+{{- else if hasSuffix "P" $quantity -}}
+{{- $n = trimSuffix "P" $quantity | int64 | mul 1000000000000000 -}}
+{{- else if hasSuffix "E" $quantity -}}
+{{- $n = trimSuffix "E" $quantity | int64 | mul 1000000000000000000 -}}
+{{- else if hasSuffix "ki" $quantity -}}
+{{- $n = trimSuffix "ki" $quantity | int64 | mul 1024 -}}
+{{- else if hasSuffix "Mi" $quantity -}}
+{{- $n = trimSuffix "Mi" $quantity | int64 | mul 1048576 -}}
+{{- else if hasSuffix "Gi" $quantity -}}
+{{- $n = trimSuffix "Gi" $quantity | int64 | mul 1073741824 -}}
+{{- else if hasSuffix "Ti" $quantity -}}
+{{- $n = trimSuffix "Ti" $quantity | int64 | mul 1099511627776 -}}
+{{- else if hasSuffix "Pi" $quantity -}}
+{{- $n = trimSuffix "Pi" $quantity | int64 | mul 1125899906842624 -}}
+{{- else if hasSuffix "Ei" $quantity -}}
+{{- $n = trimSuffix "Ei" $quantity | int64 | mul 1152921504606846976 -}}
+{{- end -}}
+{{- end -}}
+{{- if le ($n | float64) 0.0 -}}
+{{- fail (print "invalid quantity: " $quantity) -}}
+{{- end -}}
+{{- if kindIs "float64" $n -}}
+{{- printf "%f" $n -}}
+{{- else -}}
+{{- printf "%v" $n -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Prints the ports section of the container spec. Also validates all port names and numbers to ensure
+that they are consistent and that there are no overlaps.
+*/}}
+{{- define "polaris.containerPorts" -}}
+ports:
+{{- $ports := dict -}}
+
+{{- /* Main service ports */ -}}
+{{- range $i, $port := .Values.service.ports -}}
+{{- if hasKey $ports $port.name -}}
+{{- fail (printf "service.ports[%d]: port name already taken: %v" $i $port.name) -}}
+{{- end -}}
+{{- $portNumber := coalesce $port.targetPort $port.port -}}
+{{- if has $portNumber (values $ports) -}}
+{{- fail (printf "service.ports[%d]: port number already taken: %v" $i $portNumber) -}}
+{{- end -}}
+{{- $_ := set $ports $port.name $portNumber }}
Review Comment:
nits: lines 261-264 and 276-278, may want to add 2 more space for each of them to fix indentation (still valid yaml files)
##########
helm/polaris/templates/tests/test-connection.yaml:
##########
@@ -35,5 +35,7 @@ spec:
- name: wget
image: busybox
command: ['wget']
- args: ['{{ include "polaris.fullname" . }}:{{ index .Values.service.ports "polaris-metrics" }}/q/health']
+ args:
+ - --spider
+ - '{{ include "polaris.fullnameWithSuffix" (list . "mgmt") }}:{{ get (first .Values.managementService.ports) "port" }}/q/health/ready'
restartPolicy: Never
Review Comment:
Seem likes now the pod will take some time to start up. From my local testing, this will always fail. Should we consider add an init container to sleep for X seconds before run the connection test? Here is a sample change:
```
initContainers:
- name: sleep
image: busybox
command: ['sleep', '30']
```
##########
helm/polaris/templates/_helpers.tpl:
##########
@@ -79,3 +102,198 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
+
+{{/*
+Merges the advanced configuration into the destination map.
+*/}}
+{{- define "polaris.mergeAdvancedConfig" -}}
+{{- $advConfig := index . 0 -}}
+{{- $prefix := index . 1 -}}
+{{- $dest := index . 2 -}}
+{{- range $key, $val := $advConfig -}}
+{{- $name := ternary $key (print $prefix "." $key) (eq $prefix "") -}}
+{{- if kindOf $val | eq "map" -}}
+{{- list $val $name $dest | include "polaris.mergeAdvancedConfig" -}}
+{{- else -}}
+{{- $_ := set $dest $name $val -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Prints the configuration option to the destination configmap entry. See confimap.yaml.
+Any nil values will be printed as empty config options; otherwise, the value will be evaluated
+as a template against the global context, then printed. Furthermore, if the value contains
+line breaks, they will be escaped and a multi-line option will be printed.
+*/}}
+{{- define "polaris.appendConfigOption" -}}
+{{- $key := index . 0 -}}
+{{- $value := index . 1 -}}
+{{- $global := index . 2 -}}
+{{- $valAsString := "" -}}
+{{- if ne $value nil -}}
+{{- $valAsString = tpl (toString $value) $global -}}
+{{- if contains "\r\n" $valAsString -}}
+{{- $valAsString = $valAsString | nindent 4 | replace "\r\n" "\\\r\n" -}}
+{{- else if contains "\n" $valAsString -}}
+{{- $valAsString = $valAsString | nindent 4 | replace "\n" "\\\n" -}}
+{{- end -}}
+{{- end -}}
+{{ print $key "=" $valAsString }}
+{{- end -}}
+
+{{/*
+Convert a dict into a string formed by a comma-separated list of key-value pairs: key1=value1,key2=value2, ...
+*/}}
+{{- define "polaris.dictToString" -}}
+{{- $list := list -}}
+{{- range $k, $v := . -}}
+{{- $list = append $list (printf "%s=%s" $k $v) -}}
+{{- end -}}
+{{ join "," $list }}
+{{- end -}}
+
+{{/*
+Prints the config volume definition for deployments and jobs.
+*/}}
+{{- define "polaris.configVolume" -}}
+- name: config-volume
+ projected:
+ sources:
+ - configMap:
+ name: {{ include "polaris.fullname" . }}
+ items:
+ - key: application.properties
+ path: application.properties
+ {{- if .Values.authentication.tokenBroker.secret.name }}
+ - secret:
+ name: {{ tpl .Values.authentication.tokenBroker.secret.name . }}
+ items:
+ {{- if eq .Values.authentication.tokenBroker.type "rsa-key-pair" }}
+ - key: {{ tpl .Values.authentication.tokenBroker.secret.publicKey . }}
Review Comment:
nits: lines 173-175 and 179-180, may want to add 2 more space for each of them to fix indentation (still valid yaml files)
##########
helm/polaris/README.md:
##########
@@ -45,41 +45,105 @@ A Helm chart for Polaris.
### Optional
-When using a custom `persistence.xml`, a Kubernetes Secret must be created for `.persistenceConfigSecret`. Below is a sample command:
+When using a custom `persistence.xml`, a Kubernetes Secret must be created for it. Below is a sample command:
```bash
kubectl create secret generic polaris-secret -n polaris --from-file=persistence.xml
```
### From local directory (for development purposes)
-From Polaris repo root:
+The below instructions assume Minikube is running and Helm is installed.
+
+If necessary, load the Docker images into Minikube:
+
+```bash
+eval $(minikube -p minikube docker-env)
Review Comment:
nits: I used [kind](https://kind.sigs.k8s.io/) a lot more as oppose to minikube (both are great...kind is very lightwight and super fast). I am okay with switching to minikube, we may want to update https://github.com/apache/polaris/blob/main/run.sh as well to match the same.
##########
.github/workflows/helm.yml:
##########
@@ -99,7 +99,7 @@ jobs:
if: steps.list-changed.outputs.changed == 'true'
run: |
eval $(minikube -p minikube docker-env)
- ./gradlew :polaris-quarkus-server:assemble \
+ ./gradlew :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
-Dquarkus.container-image.build=true \
-PeclipseLinkDeps=com.h2database:h2:2.3.232
Review Comment:
While testing the helm, I noticed the bootstrap pod will shows the bootstrap is completed. However, when trying to use the polaris CLI against the server, it will say the instance is not yet bootstrapped. Not sure if this is known issue?
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1930699048
##########
.github/workflows/helm.yml:
##########
@@ -99,7 +99,7 @@ jobs:
if: steps.list-changed.outputs.changed == 'true'
run: |
eval $(minikube -p minikube docker-env)
- ./gradlew :polaris-quarkus-server:assemble \
+ ./gradlew :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
-Dquarkus.container-image.build=true \
-PeclipseLinkDeps=com.h2database:h2:2.3.232
Review Comment:
> is probably hitting in-memory persistency for h2database i think?
Yup it was using H2 in-memory.
> So maybe good to introduce those changes now?
I just pushed a commit that switches our tests to postgres. It's working well in CI.
When doing local testing though, if you install the chart more than once, you need to either kill the postgres pod or `--set bootstrap.enabled=false` to avoid an error when bootstrapping the realm, since it was already bootstrapped previously.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1930207183
##########
helm/polaris/templates/tests/test-connection.yaml:
##########
@@ -35,5 +35,7 @@ spec:
- name: wget
image: busybox
command: ['wget']
- args: ['{{ include "polaris.fullname" . }}:{{ index .Values.service.ports "polaris-metrics" }}/q/health']
+ args:
+ - --spider
+ - '{{ include "polaris.fullnameWithSuffix" (list . "mgmt") }}:{{ get (first .Values.managementService.ports) "port" }}/q/health/ready'
restartPolicy: Never
Review Comment:
Hmm it wasn't failing for me, the test pod always comes up _after_ the Polaris pod reaches ready state.
I don't mind changing but waiting 30 seconds seems a lot, how about we poll the health endpoint X times until it succeeds?
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on PR #626:
URL: https://github.com/apache/polaris/pull/626#issuecomment-2628978119
@MonkeyCanCode I rebased and squashed. I also added more unit tests for services. Let me know what you think!
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "flyrain (via GitHub)" <gi...@apache.org>.
flyrain commented on PR #626:
URL: https://github.com/apache/polaris/pull/626#issuecomment-2634637250
cc @gh-yzou
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on PR #626:
URL: https://github.com/apache/polaris/pull/626#issuecomment-2639641716
@MonkeyCanCode @gh-yzou while answering a question from @gh-yzou I realized that I forgot to set `ClusterIP: None` (headless) by default for the management service. I just fixed it in the last commit. It's common practice to use headless services for healthchecks and metrics scraping. Let me know if you are OK.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1941094785
##########
.github/workflows/helm.yml:
##########
@@ -79,7 +79,7 @@ jobs:
if: steps.list-changed.outputs.changed == 'true'
run: |
helm plugin install https://github.com/helm-unittest/helm-unittest.git || true
- helm unittest helm/polaris
+ helm unittest helm/polaris 2> >(grep -v 'found symbolic link' >&2)
Review Comment:
#912 is merged! I removed the workaround.
##########
helm/polaris/README.md:
##########
@@ -45,41 +48,139 @@ A Helm chart for Polaris.
### Optional
-When using a custom `persistence.xml`, a Kubernetes Secret must be created for `.persistenceConfigSecret`. Below is a sample command:
+When using a custom `persistence.xml`, a Kubernetes Secret must be created for it. Below is a sample command:
```bash
kubectl create secret generic polaris-secret -n polaris --from-file=persistence.xml
```
-### From local directory (for development purposes)
+### Running the unit tests
-From Polaris repo root:
+Helm unit tests do not require a Kubernetes cluster. To run the unit tests from the Polaris repo
+root:
```bash
-$ helm install polaris helm/polaris --namespace polaris --create-namespace
+helm unittest helm/polaris 2> >(grep -v 'found symbolic link' >&2)
Review Comment:
Removed.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1938615731
##########
.github/workflows/helm.yml:
##########
@@ -79,7 +79,7 @@ jobs:
if: steps.list-changed.outputs.changed == 'true'
run: |
helm plugin install https://github.com/helm-unittest/helm-unittest.git || true
- helm unittest helm/polaris
+ helm unittest helm/polaris 2> >(grep -v 'found symbolic link' >&2)
Review Comment:
With https://github.com/apache/polaris/pull/912/files, we will need only the original command without filter out the warning messages due to symbolic link.
##########
helm/polaris/ci/fixtures/persistence.yaml:
##########
@@ -38,9 +38,10 @@ stringData:
<class>org.apache.polaris.jpa.models.ModelSequenceId</class>
<shared-cache-mode>NONE</shared-cache-mode>
<properties>
- <property name="jakarta.persistence.jdbc.url" value="jdbc:h2:mem:polaris-{realm}"/>
- <property name="jakarta.persistence.jdbc.user" value="sa"/>
- <property name="jakarta.persistence.jdbc.password" value=""/>
+ <property name="jakarta.persistence.jdbc.url"
Review Comment:
EclipseLink uses a default of 32 connections for connection pooling. For local testing, this is more than enough. If people want to use it for some load testing, this will suffer when there are many concurrent client connection. Do you think we may want to add an example or add the default value here? So for people who may not be familiar with EclipseLink, they can just change the max value etc.
##########
helm/polaris/values.yaml:
##########
@@ -28,14 +28,9 @@ image:
pullPolicy: IfNotPresent
# -- The image tag.
tag: "latest"
-
-toolsImage:
- # -- The image repository to pull from (must have jar binary included).
- repository: registry.access.redhat.com/ubi9/openjdk-21
- # -- The image pull policy.
- pullPolicy: IfNotPresent
- # -- The image tag.
- tag: "latest"
+ # -- The path to the directory where the application.properties file, and other configuration
+ # files, if any, should be mounted.
+ configDir: /deployments/config
Review Comment:
Should we add a similar comment here for the file listing issue (https://github.com/apache/polaris/pull/907)
##########
helm/polaris/README.md:
##########
@@ -45,41 +48,139 @@ A Helm chart for Polaris.
### Optional
-When using a custom `persistence.xml`, a Kubernetes Secret must be created for `.persistenceConfigSecret`. Below is a sample command:
+When using a custom `persistence.xml`, a Kubernetes Secret must be created for it. Below is a sample command:
```bash
kubectl create secret generic polaris-secret -n polaris --from-file=persistence.xml
```
-### From local directory (for development purposes)
+### Running the unit tests
-From Polaris repo root:
+Helm unit tests do not require a Kubernetes cluster. To run the unit tests from the Polaris repo
+root:
```bash
-$ helm install polaris helm/polaris --namespace polaris --create-namespace
+helm unittest helm/polaris 2> >(grep -v 'found symbolic link' >&2)
Review Comment:
Same as above if we should merge https://github.com/apache/polaris/pull/912/files first then remove the filter part.
##########
helm/polaris/templates/configmap.yaml:
##########
@@ -28,5 +28,176 @@ metadata:
{{- tpl (toYaml .Values.configMapLabels) . | nindent 4 }}
{{- end }}
data:
- polaris-server.yml: |-
-{{ toYaml .Values.polarisServerConfig | indent 4 }}
\ No newline at end of file
+ application.properties: |-
+ {{- $map := dict -}}
+
+ {{- /* Realm Context */ -}}
+ {{- $_ := set $map "polaris.realm-context.type" .Values.realmContext.type -}}
+ {{- $_ = set $map "polaris.realm-context.realms" (join "," .Values.realmContext.realms) -}}
+
+ {{- /* Features */ -}}
+ {{- range $k, $v := .Values.features.defaults -}}
+ {{- $_ = set $map (printf "polaris.features.defaults.\"%s\"" $k) (toJson $v) -}}
+ {{- end -}}
+ {{- range $realm, $overrides := .Values.features.realmOverrides -}}
+ {{- range $k, $v := $overrides -}}
+ {{- $_ = set $map (printf "polaris.config.realm-overrides.\"%s\".\"%s\"" $realm $k) (toJson $v) -}}
+ {{- end -}}
+ {{- end -}}
+
+ {{- /* Persistence */ -}}
+ {{- $_ = set $map "polaris.persistence.type" .Values.persistence.type -}}
+ {{- if and ( eq .Values.persistence.type "eclipse-link" ) .Values.persistence.eclipseLink.secret.name -}}
+ {{- $_ = set $map "polaris.persistence.eclipselink.persistence-unit" .Values.persistence.eclipseLink.persistenceUnit -}}
+ {{- $_ = set $map "polaris.persistence.eclipselink.configuration-file" (printf "%s/persistence.xml" .Values.image.configDir ) -}}
+ {{- end -}}
+
+ {{- /* File IO */ -}}
+ {{- $_ = set $map "polaris.file-io.type" .Values.fileIo.type -}}
+
+ {{- /* Storage */ -}}
+ {{- if .Values.storage.secret.gcpTokenLifespan -}}
+ {{- $_ = set $map "polaris.storage.gcp.lifespan" .Values.storage.secret.gcpTokenLifespan -}}
+ {{- end -}}
+
+ {{- /* Rate Limiter */ -}}
+ {{- $_ = set $map "polaris.rate-limiter.filter.type" .Values.rateLimiter.type -}}
+ {{- if ne .Values.rateLimiter.type "no-op" -}}
+ {{- $_ = set $map "polaris.rate-limiter.token-bucket.type" .Values.rateLimiter.tokenBucket.type -}}
+ {{- $_ = set $map "polaris.rate-limiter.token-bucket.requests-per-second" .Values.rateLimiter.tokenBucket.requestsPerSecond -}}
+ {{- $_ = set $map "polaris.rate-limiter.token-bucket.window" .Values.rateLimiter.tokenBucket.window -}}
+ {{- end -}}
+
+ {{- /* Tasks */ -}}
+ {{- if .Values.tasks.maxConcurrentTasks -}}
+ {{- $_ = set $map "polaris.tasks.max-concurrent-tasks" .Values.tasks.maxConcurrentTasks -}}
+ {{- end -}}
+ {{- if .Values.tasks.maxQueuedTasks -}}
+ {{- $_ = set $map "polaris.tasks.max-queued-tasks" .Values.tasks.maxQueuedTasks -}}
+ {{- end -}}
+
+ {{- /* Authentication */ -}}
+ {{- $_ = set $map "polaris.authentication.authenticator.type" .Values.authentication.authenticator.type -}}
+ {{- $_ = set $map "polaris.authentication.token-service.type" .Values.authentication.tokenService.type -}}
+ {{- $_ = set $map "polaris.authentication.token-broker.type" .Values.authentication.tokenBroker.type -}}
+ {{- $_ = set $map "polaris.authentication.token-broker.max-token-generation" .Values.authentication.tokenBroker.maxTokenGeneration -}}
+ {{- if .Values.authentication.tokenBroker.secret.name -}}
+ {{- if eq .Values.authentication.tokenBroker.type "rsa-key-pair" -}}
+ {{- $_ = set $map "polaris.authentication.token-broker.rsa-key-pair.public-key-file" (printf "%s/public.pem" .Values.image.configDir ) -}}
+ {{- $_ = set $map "polaris.authentication.token-broker.rsa-key-pair.private-key-file" (printf "%s/private.pem" .Values.image.configDir ) -}}
+ {{- end -}}
+ {{- if eq .Values.authentication.tokenBroker.type "symmetric-key" -}}
+ {{- $_ = set $map "polaris.authentication.token-broker.symmetric-key.file" (printf "%s/symmetric.key" .Values.image.configDir ) -}}
+ {{- end -}}
+ {{- end -}}
+
+ {{- /* HTTP ports */ -}}
+ {{- $_ = set $map "quarkus.http.port" (get (first .Values.service.ports) "port") -}}
+ {{- $_ = set $map "quarkus.management.port" (get (first .Values.managementService.ports) "port") -}}
+
+ {{- /* CORS */ -}}
+ {{- if .Values.cors.allowedOrigins -}}
+ {{- $_ = set $map "quarkus.http.cors.origins" (join "," .Values.cors.allowedOrigins) -}}
+ {{- end -}}
+ {{- if .Values.cors.allowedMethods -}}
+ {{- $_ = set $map "quarkus.http.cors.methods" (join "," .Values.cors.allowedMethods) -}}
+ {{- end -}}
+ {{- if .Values.cors.allowedHeaders -}}
+ {{- $_ = set $map "quarkus.http.cors.headers" (join "," .Values.cors.allowedHeaders) -}}
+ {{- end -}}
+ {{- if .Values.cors.exposedHeaders -}}
+ {{- $_ = set $map "quarkus.http.cors.exposed-headers" (join "," .Values.cors.exposedHeaders) -}}
+ {{- end -}}
+ {{- if .Values.cors.accessControlMaxAge -}}
+ {{- $_ = set $map "quarkus.http.cors.access-control-max-age" .Values.cors.accessControlMaxAge -}}
+ {{- end -}}
+ {{- if ne .Values.cors.accessControlAllowCredentials nil -}}
+ {{- $_ = set $map "quarkus.http.cors.access-control-allow-credentials" .Values.cors.accessControlAllowCredentials -}}
+ {{- end -}}
+
+ {{- /* Logging */ -}}
+ {{- $_ = set $map "quarkus.log.level" .Values.logging.level -}}
+ {{- if .Values.logging.console.enabled -}}
+ {{- $_ = set $map "quarkus.log.console.enable" "true" -}}
+ {{- $_ = set $map "quarkus.log.console.level" .Values.logging.console.threshold -}}
+ {{- if .Values.logging.console.json -}}
+ {{- $_ = set $map "quarkus.log.console.json" "true" -}}
+ {{- else -}}
+ {{- $_ = set $map "quarkus.log.console.format" .Values.logging.console.format -}}
+ {{- end -}}
+ {{- else -}}
+ {{- $_ = set $map "quarkus.log.console.enable" "false" -}}
+ {{- end -}}
+ {{- if .Values.logging.file.enabled -}}
+ {{- $_ = set $map "quarkus.log.file.enable" "true" -}}
+ {{- $_ = set $map "quarkus.log.file.level" .Values.logging.file.threshold -}}
+ {{- $_ = set $map "quarkus.log.file.path" (printf "%s/%s" .Values.logging.file.logsDir .Values.logging.file.fileName) -}}
+ {{- $_ = set $map "quarkus.log.file.rotation.max-file-size" (include "polaris.quantity" .Values.logging.file.rotation.maxFileSize) -}}
+ {{- $_ = set $map "quarkus.log.file.rotation.max-backup-index" .Values.logging.file.rotation.maxBackupIndex -}}
+ {{- if .Values.logging.file.rotation.fileSuffix -}}
+ {{- $_ = set $map "quarkus.log.file.rotation.file-suffix" .Values.logging.file.rotation.fileSuffix -}}
+ {{- end -}}
+ {{- if .Values.logging.file.json -}}
+ {{- $_ = set $map "quarkus.log.file.json" "true" -}}
+ {{- else -}}
+ {{- $_ = set $map "quarkus.log.file.format" .Values.logging.file.format -}}
+ {{- end -}}
+ {{- else -}}
+ {{- $_ = set $map "quarkus.log.file.enable" "false" -}}
+ {{- end -}}
+ {{- $categories := dict -}}
+ {{- list .Values.logging.categories "" $categories | include "polaris.mergeConfigTree" -}}
+ {{- range $k, $v := $categories -}}
+ {{- $_ = set $map (printf "quarkus.log.category.\"%s\".level" $k) $v -}}
+ {{- end -}}
+ {{- $_ = set $map "polaris.log.request-id-header-name" .Values.logging.requestIdHeaderName -}}
+ {{- $mdc := dict -}}
+ {{- list .Values.logging.mdc "" $mdc | include "polaris.mergeConfigTree" -}}
+ {{- range $k, $v := $mdc -}}
+ {{- $_ = set $map (printf "polaris.log.mdc.\"%s\"" $k) $v -}}
+ {{- end -}}
+
+ {{- /* Telemetry */ -}}
+ {{- if .Values.tracing.enabled -}}
+ {{- $_ = set $map "quarkus.otel.exporter.otlp.endpoint" .Values.tracing.endpoint -}}
+ {{- if .Values.tracing.attributes -}}
+ {{- $attributes := dict -}}
+ {{- list .Values.tracing.attributes "" $attributes | include "polaris.mergeConfigTree" -}}
+ {{- $i := 0 -}}
+ {{- range $k, $v := $attributes -}}
+ {{- $_ = set $map (printf "quarkus.otel.resource.attributes[%d]" $i) (printf "%s=%s" $k $v) -}}
+ {{- $i = add1 $i -}}
+ {{- end -}}
+ {{- end -}}
+ {{- if .Values.tracing.sample -}}
+ {{- $sample := toString .Values.tracing.sample -}}
+ {{ if eq $sample "all" -}}
+ {{- $_ = set $map "quarkus.otel.traces.sampler" "parentbased_always_on" -}}
+ {{- else if eq $sample "none" -}}
+ {{- $_ = set $map "quarkus.otel.traces.sampler" "always_off" -}}
+ {{- else -}}
+ {{- $_ = set $map "quarkus.otel.traces.sampler" "parentbased_traceidratio" -}}
+ {{- $_ = set $map "quarkus.otel.traces.sampler.arg" $sample -}}
+ {{- end -}}
+ {{- end -}}
+ {{- else -}}
+ {{- $_ = set $map "quarkus.otel.sdk.disabled" true -}}
+ {{- end -}}
+
+ {{- /* Metrics */ -}}
+ {{- if .Values.metrics.enabled -}}
+ {{- range $name, $value := .Values.metrics.tags -}}
+ {{- $_ = set $map (print "polaris.metrics.tags." $name) $value -}}
+ {{- end -}}
+ {{- else -}}
+ {{- $_ = set $map "quarkus.micrometer.enabled" "false" -}}
+ {{- end -}}
+
+ {{- /* Advanced Configuration (must be done last since it can override any of the settings above) */ -}}
+ {{- list .Values.advancedConfig "" $map | include "polaris.mergeConfigTree" -}}
+
+ {{- /* Print the resulting configmap; each configuration option is templatized */ -}}
+ {{- $global := . -}}
+ {{- range $k, $v := $map }}
+ {{ include "polaris.appendConfigOption" (list $k $v $global) }}
Review Comment:
nits: extra space between "list $k"
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1930665495
##########
.github/workflows/helm.yml:
##########
@@ -99,7 +99,7 @@ jobs:
if: steps.list-changed.outputs.changed == 'true'
run: |
eval $(minikube -p minikube docker-env)
- ./gradlew :polaris-quarkus-server:assemble \
+ ./gradlew :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
-Dquarkus.container-image.build=true \
-PeclipseLinkDeps=com.h2database:h2:2.3.232
Review Comment:
Yes, I was using this branch for testing and bootstrap is probably hitting in-memory persistency for h2database i think? I also agreed we should use somewhat real db people may be using (e.g. Postgres) instead of using h2database (kinds left people to think this project is not close to ready to be use).
The latest main branch seems to be pretty stable (I only did some basic testing...planning to do more later this weekend). So maybe good to introduce those changes now?
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on PR #626:
URL: https://github.com/apache/polaris/pull/626#issuecomment-2612985191
> This is now ready for review.
>
> @MonkeyCanCode I would love to get your review on this please :-)
>
> I know we could add more unit tests, but I wanted to get your general feeling first. We can complete test coverage little by little imho.
Great. Nice work. I will review those later this weekend
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1938610656
##########
helm/polaris/templates/job.yaml:
##########
@@ -43,71 +43,89 @@ spec:
{{- tpl (toYaml .Values.podLabels) . | nindent 8 }}
{{- end }}
spec:
- {{- if and .Values.persistenceConfigSecret (index .Values.polarisServerConfig.metaStoreManager "conf-file") }}
- initContainers:
- - name: init-config
- image: "{{ tpl .Values.toolsImage.repository . }}:{{ tpl .Values.toolsImage.tag . }}"
- imagePullPolicy: {{ tpl .Values.toolsImage.pullPolicy . }}
- command: ["jar"]
- args: ["-cf", "/eclipselink-config/conf.jar", "-C", "/secret", "persistence.xml"]
- {{- if .Values.securityContext}}
- securityContext:
- {{- tpl (toYaml .Values.securityContext) . | nindent 12 }}
- {{- end }}
- volumeMounts:
- - name: eclipselink-config-volume
- mountPath: /eclipselink-config
- - name: secret-volume
- mountPath: /secret
- {{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.imagePullSecrets }}
- name: {{ . | quote }}
{{- end }}
{{- end }}
serviceAccountName: {{ include "polaris.serviceAccountName" . }}
- {{- if .Values.podSecurityContext}}
+ {{- if .Values.podSecurityContext }}
securityContext:
{{- tpl (toYaml .Values.podSecurityContext) . | nindent 8 }}
{{- end }}
- containers:
- - name: {{ .Chart.Name }}
- {{- if .Values.securityContext}}
+ {{- if .Values.bootstrap.purge }}
+ initContainers:
+ - name: "polaris-purge"
+ {{- if .Values.containerSecurityContext }}
securityContext:
- {{- tpl (toYaml .Values.securityContext) . | nindent 12 }}
+ {{- tpl (toYaml .Values.containerSecurityContext) . | nindent 12 }}
{{- end }}
- image: "{{ tpl .Values.image.repository . }}:{{ tpl .Values.image.tag . | default .Chart.Version }}"
- imagePullPolicy: {{ tpl .Values.image.pullPolicy . }}
- command: ["/app/bin/polaris-service"]
- args: ["bootstrap", "/app/config/polaris-server.yml"]
- {{- if .Values.bootstrapExtraEnv }}
+ image: "{{ tpl .Values.bootstrap.image.repository . }}:{{ tpl .Values.bootstrap.image.tag . | default .Chart.Version }}"
+ imagePullPolicy: {{ tpl .Values.bootstrap.image.pullPolicy . }}
+ args:
+ - "purge"
+ {{- range $realm := .Values.bootstrap.realms }}
+ - --realm={{ tpl $realm $ }}
+ {{- end }}
env:
- {{- tpl (toYaml .Values.bootstrapExtraEnv) . | nindent 12 }}
- {{- end }}
+ {{- if .Values.bootstrap.extraEnv }}
+ {{- tpl (toYaml .Values.bootstrap.extraEnv) . | nindent 12 }}
+ {{- end }}
+ - name: "quarkus.log.file.enable"
+ value: "false"
volumeMounts:
- name: config-volume
- mountPath: /app/config/polaris-server.yml
- subPath: polaris-server.yml
- {{- if and .Values.persistenceConfigSecret (index .Values.polarisServerConfig.metaStoreManager "conf-file") }}
- - name: eclipselink-config-volume
- mountPath: /eclipselink-config
+ mountPath: {{ trimSuffix "/" .Values.bootstrap.image.configDir }}
+ readOnly: true
+ - name: temp-dir
+ mountPath: /tmp
+ readOnly: false
+ {{- if .Values.resources }}
+ resources:
+ {{- tpl (toYaml .Values.resources) . | nindent 12 }}
+ {{- end }}
+ {{- end }}
+ containers:
+ - name: "polaris-bootstrap"
Review Comment:
Yes, I think that is fine too. May be better drop the support now before the first release as oppose to later.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "gh-yzou (via GitHub)" <gi...@apache.org>.
gh-yzou commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1944011803
##########
helm/polaris/ci/fixtures/storage.yaml:
##########
@@ -0,0 +1,27 @@
+#
+# 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: Secret
+metadata:
+ name: polaris-storage
+type: Opaque
+stringData:
+ access-key: "my-key"
+ secret-key: "my-secret"
Review Comment:
new line
##########
helm/polaris/ci/fixtures/token-broker.yaml:
##########
@@ -0,0 +1,59 @@
+#
+# 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: Secret
+metadata:
+ name: polaris-token-broker
+type: Opaque
+stringData:
+ private.pem: |-
+ -----BEGIN PRIVATE KEY-----
+ MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDiae5jQnQ+Dt8Optpa4fLNuUfI
Review Comment:
where does the private key and public key coming from ? will we be able to generate it on fly?
##########
helm/polaris/ci/fixtures/persistence.yaml:
##########
@@ -38,13 +38,17 @@ stringData:
<class>org.apache.polaris.jpa.models.ModelSequenceId</class>
<shared-cache-mode>NONE</shared-cache-mode>
<properties>
- <property name="jakarta.persistence.jdbc.url" value="jdbc:h2:mem:polaris-{realm}"/>
- <property name="jakarta.persistence.jdbc.user" value="sa"/>
- <property name="jakarta.persistence.jdbc.password" value=""/>
+ <property name="jakarta.persistence.jdbc.url"
+ value="jdbc:postgresql://postgres:5432/{realm}"/>
+ <property name="jakarta.persistence.jdbc.user" value="postgres"/>
+ <property name="jakarta.persistence.jdbc.password" value="postgres"/>
<property name="jakarta.persistence.schema-generation.database.action" value="create"/>
<property name="eclipselink.logging.level.sql" value="FINE"/>
<property name="eclipselink.logging.parameters" value="true"/>
<property name="eclipselink.persistence-context.flush-mode" value="auto"/>
+ <property name="eclipselink.connection-pool.default.initial" value="1" />
Review Comment:
does that mean by default we will have a connection pool with size 1? maybe we should mention this in the read me, and along with some instruction about how to adjust the size
##########
helm/polaris/ci/extra-service-values.yaml:
##########
@@ -0,0 +1,47 @@
+#
+# 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.
+#
+
+image:
+ pullPolicy: Never
+
+service:
+ type: ClusterIP
+ sessionAffinity: ClientIP
+ internalTrafficPolicy: Cluster
+ externalTrafficPolicy: Cluster
+ ports:
+ - name: polaris-http
Review Comment:
is that two ports one for icebergRestCatalog service, and another one for OAuth service?
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "MonkeyCanCode (via GitHub)" <gi...@apache.org>.
MonkeyCanCode commented on PR #626:
URL: https://github.com/apache/polaris/pull/626#issuecomment-2644457969
> @adutra i don't have other further questions, but i am not familiar with this part, so I will let @MonkeyCanCode and @collado-mike to do the final approval on this. You don't have to wait for me to approve this.
Thought I clicked on approved earlier. Approved. Very well done.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on PR #626:
URL: https://github.com/apache/polaris/pull/626#issuecomment-2612975540
This is now ready for review.
@MonkeyCanCode I would love to get your review on this please :-)
I know we could add more unit tests, but I wanted to get your general feeling first. We can complete test coverage little by little imho.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Helm chart redesign for Quarkus-based runtimes [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra commented on code in PR #626:
URL: https://github.com/apache/polaris/pull/626#discussion_r1929194870
##########
helm/polaris/values.yaml:
##########
@@ -233,170 +326,288 @@ extraEnv:
# name: aws-secret
# key: secret_access_key
-# -- Configures whether to enable the bootstrap metastore manager job
-bootstrapMetastoreManager: false
-
-# -- Extra environment variables to add to the bootstrap metastore manager job (see `extraEnv` for an example)
-bootstrapExtraEnv: []
-
-# -- The secret name to pull persistence.xml from (ensure the key name is 'persistence.xml')
-persistenceConfigSecret: ~
-
-# -- Configures for polaris-server.yml
-polarisServerConfig:
- server:
- # Maximum number of threads.
- maxThreads: 200
-
- # Minimum number of thread to keep alive.
- minThreads: 10
- applicationConnectors:
- # HTTP-specific options.
- - type: http
-
- # The port on which the HTTP server listens for service requests.
- port: 8181
-
- adminConnectors:
- - type: http
- port: 8182
-
- # The hostname of the interface to which the HTTP server socket wil be found. If omitted, the
- # socket will listen on all interfaces.
- # bindHost: localhost
-
- # ssl:
- # keyStore: ./example.keystore
- # keyStorePassword: example
- #
- # keyStoreType: JKS # (optional, JKS is default)
-
- # HTTP request log settings
- requestLog:
- appenders:
- # Settings for logging to stdout.
- - type: console
-
- # # Settings for logging to a file.
- # - type: file
-
- # # The file to which statements will be logged.
- # currentLogFilename: ./logs/request.log
-
- # # When the log file rolls over, the file will be archived to requests-2012-03-15.log.gz,
- # # requests.log will be truncated, and new statements written to it.
- # archivedLogFilenamePattern: ./logs/requests-%d.log.gz
-
- # # The maximum number of log files to archive.
- # archivedFileCount: 14
-
- # # Enable archiving if the request log entries go to the their own file
- # archive: true
-
- featureConfiguration:
- ENFORCE_PRINCIPAL_CREDENTIAL_ROTATION_REQUIRED_CHECKING: false
- SUPPORTED_CATALOG_STORAGE_TYPES:
- - S3
- - GCS
- - AZURE
- - FILE
-
- callContextResolver:
+# -- Extra volumes to add to the polaris pod. See https://kubernetes.io/docs/concepts/storage/volumes/.
+extraVolumes: []
+ # - name: extra-volume
+ # emptyDir: {}
+
+# -- Extra volume mounts to add to the polaris container. See https://kubernetes.io/docs/concepts/storage/volumes/.
+extraVolumeMounts: []
+ # - name: extra-volume
+ # mountPath: /usr/share/extra-volume
+
+# -- Add additional init containers to the polaris pod(s) See https://kubernetes.io/docs/concepts/workloads/pods/init-containers/.
+extraInitContainers: []
+ # - name: your-image-name
+ # image: your-image
+ # imagePullPolicy: Always
+ # command: ['sh', '-c', 'echo "hello world"']
+
+# -- Configures whether to enable the bootstrap metastore manager job.
+# It is recommended to bootstrap realms using the Polaris Admin Tool; use this only if you need to
+# bootstrap realms while deploying Polaris at the same time.
+bootstrap:
+ # -- Specifies whether the bootstrap metastore manager job should be enabled.
+ enabled: false
+ # -- The names of the realms to bootstrap.
+ realms: []
+ # -- The root credentials to create during the bootstrap. If you don't provide credentials for the
+ # root principal of each realm to bootstrap, random credentials will be generated.
+ # Each entry in the array must be of the form: realm,clientId,clientSecret
+ credentials: []
Review Comment:
This is admittedly not great. I opened https://github.com/apache/polaris/issues/878 to improve this and use secrets instead. But for now we need to stick with credentials in clear text.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org