Skip to content

Commit

Permalink
Helm chart redesign for Quarkus-based runtimes
Browse files Browse the repository at this point in the history
  • Loading branch information
adutra committed Jan 10, 2025
1 parent 499c4e9 commit 2076789
Show file tree
Hide file tree
Showing 25 changed files with 1,538 additions and 797 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ jobs:
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.name=polaris-testing \
-Dquarkus.container-image.tag=${BUILD_TAG}
./gradlew :polaris-quarkus-admin:assemble -x check \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.name=polaris-admin-tool-testing \
-Dquarkus.container-image.tag=${BUILD_TAG}
minikube image ls
- name: Install fixtures
Expand All @@ -118,5 +122,5 @@ jobs:
run: |
ct install --target-branch ${{ github.event.repository.default_branch }} \
--namespace polaris-ns \
--helm-extra-set-args "--set=image.repository=apache/polaris-testing --set=image.tag=${BUILD_TAG}" \
--helm-extra-set-args "--set=image.repository=apache/polaris-testing --set=image.tag=${BUILD_TAG} --set=bootstrap.image.repository=apache/polaris-server-admin-tool-testing --set=bootstrap.image.tag=${BUILD_TAG}" \
--debug --charts ./helm/polaris
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
import org.apache.polaris.core.persistence.PolarisMetaStoreManager;
import org.apache.polaris.core.persistence.PolarisMetaStoreSession;
import org.apache.polaris.core.storage.PolarisStorageIntegrationProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* The implementation of Configuration interface for configuring the {@link PolarisMetaStoreManager}
Expand All @@ -42,6 +44,9 @@
public class EclipseLinkPolarisMetaStoreManagerFactory
extends LocalPolarisMetaStoreManagerFactory<PolarisEclipseLinkStore> {

private static final Logger LOGGER =
LoggerFactory.getLogger(EclipseLinkPolarisMetaStoreManagerFactory.class);

@Inject EclipseLinkConfiguration eclipseLinkConfiguration;
@Inject PolarisStorageIntegrationProvider storageIntegrationProvider;

Expand Down
152 changes: 138 additions & 14 deletions helm/polaris/README.md

Large diffs are not rendered by default.

42 changes: 38 additions & 4 deletions helm/polaris/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,57 @@

### 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 clean :polaris-quarkus-server:build :polaris-quarkus-admin:build \
-x check \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.tag=unstable
```

Then create and populate the namespace:

```bash
kubectl create namespace polaris
kubectl apply --namespace polaris -f helm/polaris/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
```

{{ template "chart.valuesSection" . }}
59 changes: 59 additions & 0 deletions helm/polaris/ci/fixtures/token-broker.yaml
Original file line number Diff line number Diff line change
@@ -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
37Sy29JPfn22CkGNo54SJi8NtR38Q958Bx9B+30IZPm3KtZGPC38Tm78/C508h7/Bd0jO7S3/UuQ
rYlg9H8gC59j14fE5cKEiKCvHrNK35Act9LrfhwEoGBs7G+90KD3SBIWzoc4vS8AB/ey09kRN3+M
dQ/DuRrafRgEx8ecq0x4KPggrmvworVVm1ya+H2JNKUQ+uQugmwxeRDE1GuJrgNnn4+ajueEnGdc
ohgz067AgZExzoyRlujJXBuL6JRtOSbEYVpNV1laVdA8UJ2b5I1PiNnVvx1m4gFi/Cela479EO6t
+AC+a1ez+MxTAgMBAAECggEAA1QiXJQ4CEeIsPrz/90NiEe+je34Bp8jtuZ5q6j38MCkjMjB7VYp
1DEdPr6OD5bGbk6puy8mik7NMEXo7NA6UJ7UpNQtvZxdmkzfhQeAGwxNKCfzlnCvPs5P70ng7uIp
KaMix8FOGQc4GztOX5uUQvqjuy70kSBFLajeXYZAdoEOu+E3QDaCUqiJlK3cRAJhg39Br+XfOHDp
cBdhlbxqQKZHWqDR010XUNoQpMHXWTu/e779Xze9uAvmYw98YGtCW8JB5AqjnqAmCZFaktKYw5Z3
IHZCA9hTVngk0WTanuIeTlB2bbl0df+87xHfim2yDuXEkTfAOCug/Qpf+pEhfQKBgQD9M14a1MQ2
Omf9f7X401Ig32e2YfX6sW73THB8Lupz9MCBZxNFCZlzVl55bL2o2vOROEeaneGdboqASW+1ph6e
QbdipiYAfHsG/mvkysqH/plo8QT69GUlzs2yt5zdmFjvkwaZmRmbB6Gjg2sSHKB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+Pmo7nhJxnXKIYM9Ou
wIGRMc6MkZboyVwbi+iUbTkmxGFaTVdZWlXQPFCdm+SNT4jZ1b8dZuIBYvwnpWuO/RDurfgAvmtX
s/jMUwIDAQAB
-----END PUBLIC KEY-----
28 changes: 22 additions & 6 deletions helm/polaris/ci/persistence-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,26 @@
image:
pullPolicy: Never

persistenceConfigSecret: polaris-persistence
authentication:
tokenBroker:
secret:
name: polaris-token-broker

polarisServerConfig:
metaStoreManager:
type: eclipse-link
persistence-unit: polaris
conf-file: /eclipselink-config/conf.jar!/persistence.xml
logging:
file:
enabled: true
json: true
storage:
size: 50Mi

persistence:
type: eclipse-link
eclipseLink:
secret:
name: polaris-persistence

bootstrap:
enabled: true
realms: ["realm1", "realm2"]
image:
pullPolicy: Never
Loading

0 comments on commit 2076789

Please sign in to comment.