Skip to content

Commit 6ec59bf

Browse files
committed
Fixes based on feedback
1 parent 0fc8452 commit 6ec59bf

File tree

2 files changed

+72
-42
lines changed

2 files changed

+72
-42
lines changed

helm/polaris/README.md

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,29 @@ minikube start
6262
eval $(minikube docker-env)
6363

6464
./gradlew \
65-
:polaris-server:assemble \
66-
:polaris-server:quarkusAppPartsBuild --rerun \
67-
:polaris-admin:assemble \
68-
:polaris-admin:quarkusAppPartsBuild --rerun \
69-
-Dquarkus.container-image.build=true
65+
:polaris-server:assemble \
66+
:polaris-server:quarkusAppPartsBuild --rerun \
67+
:polaris-admin:assemble \
68+
:polaris-admin:quarkusAppPartsBuild --rerun \
69+
-Dquarkus.container-image.tag=postgres-latest \
70+
-Dquarkus.container-image.build=true
7071
```
7172

72-
#### Installing the Helm chart
73+
### Installing the chart locally
74+
75+
The below instructions assume a local Kubernetes cluster is running and Helm is installed.
76+
77+
#### Common setup
78+
79+
Create the target namespace:
80+
```bash
81+
kubectl create namespace polaris
82+
```
83+
84+
Create all the required resources in the `polaris` namespace. This usually includes a Postgres
85+
database and a Kubernetes Secret for Polaris service certification files. The Polaris chart does not create
86+
these resources automatically, as they are not required for all Polaris deployments. The chart will
87+
fail if these resources are not created beforehand. You can find a reference for these resources in the `Prerequisites` section within `Development & Testing`.
7388

7489
Below are two sample deployment models for installing the chart: one with a non-persistent backend and another with a persistent backend.
7590

@@ -78,13 +93,13 @@ Below are two sample deployment models for installing the chart: one with a non-
7893
> **These files are intended for testing purposes primarily, and may not be suitable for production use**.
7994
> For production deployments, create your own values files based on the provided examples.
8095
81-
##### Non-persistent backend
96+
#### Non-persistent backend
8297

8398
Install the chart with a non-persistent backend. From Polaris repo root:
8499
```bash
85100
helm upgrade --install --namespace polaris \
86101
--values helm/polaris/ci/simple-values.yaml \
87-
polaris helm/polaris --create-namespace polaris
102+
polaris helm/polaris
88103
```
89104

90105
Note: if you are running the tests on a Kind cluster started with the `run.sh` command explained
@@ -93,21 +108,14 @@ above, then you need to run `helm upgrade` as follows:
93108
helm upgrade --install --namespace polaris \
94109
--values helm/polaris/ci/simple-values.yaml \
95110
--set=image.repository=localhost:5001/apache/polaris \
96-
polaris helm/polaris --create-namespace polaris
111+
polaris helm/polaris
97112
```
98113

99114
#### Persistent backend
100115

101116
> [!WARNING]
102117
> The Postgres deployment set up in the fixtures directory is intended for testing purposes only and is not suitable for production use. For production deployments, use a managed Postgres service or a properly configured and secured Postgres instance.
103118
104-
Install the dependencies in fixtures directory. From Polaris repo root:
105-
```bash
106-
kubectl create namespace polaris
107-
kubectl apply --namespace polaris -f helm/polaris/ci/fixtures/
108-
kubectl wait --namespace polaris --for=condition=ready pod --selector=app.kubernetes.io/name=postgres --timeout=120s
109-
```
110-
111119
Install the chart with a persistent backend. From Polaris repo root:
112120
```bash
113121
helm upgrade --install --namespace polaris \
@@ -160,14 +168,20 @@ helm plugin install https://github.com/helm-unittest/helm-unittest.git
160168
brew install chart-testing
161169
```
162170

163-
The integration tests also require some fixtures to be deployed. Follow the above commands to setup required resources.
171+
The integration tests also require some fixtures to be deployed. The `ci/fixtures` directory
172+
contains the required resources. To deploy them, run the following command:
173+
```bash
174+
kubectl apply --namespace polaris -f helm/polaris/ci/fixtures/
175+
kubectl wait --namespace polaris --for=condition=ready pod --selector=app.kubernetes.io/name=postgres --timeout=120s
176+
```
164177

165-
The `helm/polaris/ci` contains a number of values files that will be used to install the chart with different configurations.
178+
The `helm/polaris/ci` contains a number of values files that will be used to install the chart with
179+
different configurations.
166180

167181
### Running the unit tests
168182

169-
Helm unit tests do not require a Kubernetes cluster. To run the unit tests, execute Helm Unit from the Polaris repo root:
170-
183+
Helm unit tests do not require a Kubernetes cluster. To run the unit tests, execute Helm Unit from
184+
the Polaris repo root:
171185
```bash
172186
helm unittest helm/polaris
173187
```
@@ -180,7 +194,8 @@ ct lint --charts helm/polaris
180194

181195
### Running the integration tests
182196

183-
Integration tests require a Kubernetes cluster. See installation instructions above for setting up a local cluster.
197+
Integration tests require a Kubernetes cluster. See installation instructions above for setting up
198+
a local cluster.
184199

185200
Integration tests are run with the Chart Testing tool:
186201
```bash

helm/polaris/README.md.gotmpl

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,29 @@ minikube start
6464
eval $(minikube docker-env)
6565

6666
./gradlew \
67-
:polaris-server:assemble \
68-
:polaris-server:quarkusAppPartsBuild --rerun \
69-
:polaris-admin:assemble \
70-
:polaris-admin:quarkusAppPartsBuild --rerun \
71-
-Dquarkus.container-image.build=true
67+
:polaris-server:assemble \
68+
:polaris-server:quarkusAppPartsBuild --rerun \
69+
:polaris-admin:assemble \
70+
:polaris-admin:quarkusAppPartsBuild --rerun \
71+
-Dquarkus.container-image.tag=postgres-latest \
72+
-Dquarkus.container-image.build=true
7273
```
7374

74-
#### Installing the Helm chart
75+
### Installing the chart locally
76+
77+
The below instructions assume a local Kubernetes cluster is running and Helm is installed.
78+
79+
#### Common setup
80+
81+
Create the target namespace:
82+
```bash
83+
kubectl create namespace polaris
84+
```
85+
86+
Create all the required resources in the `polaris` namespace. This usually includes a Postgres
87+
database and a Kubernetes Secret for Polaris service certification files. The Polaris chart does not create
88+
these resources automatically, as they are not required for all Polaris deployments. The chart will
89+
fail if these resources are not created beforehand. You can find a reference for these resources in the `Prerequisites` section within `Development & Testing`.
7590

7691
Below are two sample deployment models for installing the chart: one with a non-persistent backend and another with a persistent backend.
7792

@@ -80,13 +95,13 @@ Below are two sample deployment models for installing the chart: one with a non-
8095
> **These files are intended for testing purposes primarily, and may not be suitable for production use**.
8196
> For production deployments, create your own values files based on the provided examples.
8297

83-
##### Non-persistent backend
98+
#### Non-persistent backend
8499

85100
Install the chart with a non-persistent backend. From Polaris repo root:
86101
```bash
87102
helm upgrade --install --namespace polaris \
88103
--values helm/polaris/ci/simple-values.yaml \
89-
polaris helm/polaris --create-namespace polaris
104+
polaris helm/polaris
90105
```
91106

92107
Note: if you are running the tests on a Kind cluster started with the `run.sh` command explained
@@ -95,21 +110,14 @@ above, then you need to run `helm upgrade` as follows:
95110
helm upgrade --install --namespace polaris \
96111
--values helm/polaris/ci/simple-values.yaml \
97112
--set=image.repository=localhost:5001/apache/polaris \
98-
polaris helm/polaris --create-namespace polaris
113+
polaris helm/polaris
99114
```
100115

101116
#### Persistent backend
102117

103118
> [!WARNING]
104119
> The Postgres deployment set up in the fixtures directory is intended for testing purposes only and is not suitable for production use. For production deployments, use a managed Postgres service or a properly configured and secured Postgres instance.
105120

106-
Install the dependencies in fixtures directory. From Polaris repo root:
107-
```bash
108-
kubectl create namespace polaris
109-
kubectl apply --namespace polaris -f helm/polaris/ci/fixtures/
110-
kubectl wait --namespace polaris --for=condition=ready pod --selector=app.kubernetes.io/name=postgres --timeout=120s
111-
```
112-
113121
Install the chart with a persistent backend. From Polaris repo root:
114122
```bash
115123
helm upgrade --install --namespace polaris \
@@ -162,14 +170,20 @@ helm plugin install https://github.com/helm-unittest/helm-unittest.git
162170
brew install chart-testing
163171
```
164172

165-
The integration tests also require some fixtures to be deployed. Follow the above commands to setup required resources.
173+
The integration tests also require some fixtures to be deployed. The `ci/fixtures` directory
174+
contains the required resources. To deploy them, run the following command:
175+
```bash
176+
kubectl apply --namespace polaris -f helm/polaris/ci/fixtures/
177+
kubectl wait --namespace polaris --for=condition=ready pod --selector=app.kubernetes.io/name=postgres --timeout=120s
178+
```
166179

167-
The `helm/polaris/ci` contains a number of values files that will be used to install the chart with different configurations.
180+
The `helm/polaris/ci` contains a number of values files that will be used to install the chart with
181+
different configurations.
168182

169183
### Running the unit tests
170184

171-
Helm unit tests do not require a Kubernetes cluster. To run the unit tests, execute Helm Unit from the Polaris repo root:
172-
185+
Helm unit tests do not require a Kubernetes cluster. To run the unit tests, execute Helm Unit from
186+
the Polaris repo root:
173187
```bash
174188
helm unittest helm/polaris
175189
```
@@ -182,7 +196,8 @@ ct lint --charts helm/polaris
182196

183197
### Running the integration tests
184198

185-
Integration tests require a Kubernetes cluster. See installation instructions above for setting up a local cluster.
199+
Integration tests require a Kubernetes cluster. See installation instructions above for setting up
200+
a local cluster.
186201

187202
Integration tests are run with the Chart Testing tool:
188203
```bash

0 commit comments

Comments
 (0)