6
6
to you under the Apache License, Version 2.0 (the
7
7
"License"); you may not use this file except in compliance
8
8
with the License. You may obtain a copy of the License at
9
-
9
+
10
10
http://www.apache.org/licenses/LICENSE-2.0
11
-
11
+
12
12
Unless required by applicable law or agreed to in writing,
13
13
software distributed under the License is distributed on an
14
14
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
49
49
50
50
### Optional
51
51
52
- When using a custom `persistence.xml`, a Kubernetes Secret must be created for `.persistenceConfigSecret` . Below is a sample command:
52
+ When using a custom `persistence.xml`, a Kubernetes Secret must be created for it . Below is a sample command:
53
53
```bash
54
54
kubectl create secret generic polaris-secret -n polaris --from-file=persistence.xml
55
55
```
56
56
57
- ### From local directory (for development purposes)
57
+ ### Running the unit tests
58
+
59
+ Helm unit tests do not require a Kubernetes cluster. To run the unit tests from the Polaris repo
60
+ root:
61
+
62
+ ```bash
63
+ helm unittest helm/polaris 2> >(grep -v 'found symbolic link' >&2)
64
+ ```
65
+
66
+ Note: the `grep` command is used to filter out the annoying warning messages about symbolic links;
67
+ see https://github.com/helm/helm/issues/7019.
68
+
69
+ ### Running locally with a Kind cluster
70
+
71
+ The below instructions assume Kind and Helm are installed.
72
+
73
+ Simply run the `run.sh` script from the Polaris repo root, making sure to specify the
74
+ `--eclipse-link-deps` option:
75
+
76
+ ```bash
77
+ ./run.sh --eclipse-link-deps=org.postgresql:postgresql:42.7.4
78
+ ```
79
+
80
+ This script will create a Kind cluster, deploy a local Docker registry, build the Polaris Docker
81
+ images with support for Postgres and load them into the Kind cluster. (It will also create an
82
+ example Deployment and Service with in-memory storage.)
83
+
84
+ ### Running locally with a Minikube cluster
85
+
86
+ The below instructions assume a Minikube cluster is already running and Helm is installed.
87
+
88
+ If necessary, build and load the Docker images with support for Postgres into Minikube:
89
+
90
+ ```bash
91
+ eval $(minikube -p minikube docker-env)
92
+
93
+ ./gradlew :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
94
+ -Dquarkus.container-image.build=true \
95
+ -PeclipseLinkDeps=org.postgresql:postgresql:42.7.4
96
+ ```
97
+
98
+ ### Installing the chart locally
99
+
100
+ The below instructions assume a local Kubernetes cluster is running and Helm is installed.
101
+
102
+ Create and populate the target namespace:
103
+
104
+ ```bash
105
+ kubectl create namespace polaris
106
+ kubectl apply --namespace polaris -f helm/polaris/ci/fixtures/
107
+ ```
108
+
109
+ Finally, install the chart. From Polaris repo root:
110
+
111
+ ```bash
112
+ helm upgrade --install --namespace polaris \
113
+ --debug --values helm/polaris/ci/simple-values.yaml \
114
+ polaris helm/polaris
115
+ ```
116
+
117
+ The `helm/polaris/ci` contains a number of values files that can be used to install the chart with
118
+ different configurations.
58
119
59
- From Polaris repo root :
120
+ You can also run `ct` (chart-testing) :
60
121
61
122
```bash
62
- $ helm install polaris helm/polaris --namespace polaris --create-namespace
123
+ ct lint --charts helm/polaris
124
+ ct install --namespace polaris --debug --charts ./helm/polaris
63
125
```
64
126
65
127
### Uninstalling the chart
66
128
67
129
```bash
68
- $ helm uninstall --namespace polaris polaris
130
+ helm uninstall --namespace polaris polaris
69
131
```
70
132
71
133
{{ template "chart.valuesSection" . }}
0 commit comments