|
2 | 2 | # Janus-IDP Backstage Helm Chart |
3 | 3 |
|
4 | 4 | [](https://artifacthub.io/packages/search?repo=janus-idp) |
5 | | - |
| 5 | + |
6 | 6 |  |
7 | 7 |
|
8 | 8 | A Helm chart for deploying a Backstage application |
@@ -73,17 +73,12 @@ Once the chart has been added, install this chart. However before doing so, plea |
73 | 73 | - To get proper connection between frontend and backend of Backstage please update the `apps.example.com` to match your cluster host: |
74 | 74 |
|
75 | 75 | ```yaml |
76 | | - upstream: |
77 | | - backstage: |
78 | | - appConfig: |
79 | | - app: |
80 | | - baseUrl: 'https://{{- print .Release.Name "-" .Release.Namespace -}}.apps.example.com' |
81 | | - backend: |
82 | | - baseUrl: 'https://{{- print .Release.Name "-" .Release.Namespace -}}.apps.example.com' |
83 | | - cors: |
84 | | - origin: 'https://{{- print .Release.Name "-" .Release.Namespace -}}.apps.example.com' |
| 76 | + global: |
| 77 | + clusterRouterBase: apps.example.com |
85 | 78 | ``` |
86 | 79 |
|
| 80 | + > Tip: you can use `helm upgrade -i --set global.clusterRouterBase=apps.example.com ...` instead of a value file |
| 81 | + |
87 | 82 | - If your cluster doesn't provide PVCs, you should disable PostgreSQL persistence via: |
88 | 83 |
|
89 | 84 | ```yaml |
@@ -133,10 +128,12 @@ Kubernetes: `>= 1.19.0-0` |
133 | 128 |
|
134 | 129 | | Key | Description | Type | Default | |
135 | 130 | |-----|-------------|------|---------| |
136 | | -| route | OpenShift Route parameters | object | `{"annotations":{},"enabled":true,"host":"","path":"/","tls":{"caCertificate":"","certificate":"","destinationCACertificate":"","enabled":true,"insecureEdgeTerminationPolicy":"Redirect","key":"","termination":"edge"},"wildcardPolicy":"None"}` | |
| 131 | +| global.clusterRouterBase | Shorthand for users who do not want to specify a custom HOSTNAME. Used ONLY with the DEFAULT upstream.backstage.appConfig value and with OCP Route enabled. | string | `"apps.example.com"` | |
| 132 | +| global.host | Custom hostname shorthand, overrides `global.clusterRouterBase`, `upstream.ingress.host`, `route.host`, and url values in `upstream.backstage.appConfig` | string | `""` | |
| 133 | +| route | OpenShift Route parameters | object | `{"annotations":{},"enabled":true,"host":"{{ .Values.global.host }}","path":"/","tls":{"caCertificate":"","certificate":"","destinationCACertificate":"","enabled":true,"insecureEdgeTerminationPolicy":"Redirect","key":"","termination":"edge"},"wildcardPolicy":"None"}` | |
137 | 134 | | route.annotations | Route specific annotations | object | `{}` | |
138 | 135 | | route.enabled | Enable the creation of the route resource | bool | `true` | |
139 | | -| route.host | Set the host attribute to a custom value. If not set, OpenShift will generate it, please make sure to match your baseUrl | string | `""` | |
| 136 | +| route.host | Set the host attribute to a custom value. If not set, OpenShift will generate it, please make sure to match your baseUrl | string | `"{{ .Values.global.host }}"` | |
140 | 137 | | route.path | Path that the router watches for, to route traffic for to the service. | string | `"/"` | |
141 | 138 | | route.tls | Route TLS parameters <br /> Ref: https://docs.openshift.com/container-platform/4.9/networking/routes/secured-routes.html | object | `{"caCertificate":"","certificate":"","destinationCACertificate":"","enabled":true,"insecureEdgeTerminationPolicy":"Redirect","key":"","termination":"edge"}` | |
142 | 139 | | route.tls.caCertificate | Cert authority certificate contents. Optional | string | `""` | |
@@ -186,27 +183,38 @@ Additionally this chart enhances the upstream Backstage chart with following Ope |
186 | 183 |
|
187 | 184 | This chart offers a drop-in replacement for the `Ingress` resource already provided by the upstream chart via an OpenShift `Route`. |
188 | 185 |
|
189 | | -Please enable it using following values: |
| 186 | +OpenShift routes are enabled by default. In order to use the chart without it, please switch to the `Ingress` resource via `upstream.ingress` values. |
| 187 | + |
| 188 | +Routes can be further configured via the `route` value. |
| 189 | + |
| 190 | +By default, the chart expects you to expose Backstage via the autogenerated hostname. To provide Backstage pod with the right context, please adjust following value: |
190 | 191 |
|
191 | 192 | ```yaml |
192 | 193 | # values.yaml |
193 | | -upstream: |
194 | | - backstage: |
195 | | - extraEnvVars: |
196 | | - - name: "APP_CONFIG_app_baseUrl" |
197 | | - value: "https://{{ .Values.global.host }}" |
198 | | - - name: "APP_CONFIG_backend_baseUrl" |
199 | | - value: "https://{{ .Values.global.host }}" |
200 | | - - name: "APP_CONFIG_backend_cors_origin" |
201 | | - value: "https://{{ .Values.global.host }}" |
202 | | - ingress: |
203 | | - enabled: false |
204 | | -route: |
205 | | - enabled: true |
206 | | - host: "{{ .Values.global.host }}" |
207 | | - tls: |
208 | | - enabled: true |
| 194 | +global: |
| 195 | + clusterRouterBase: apps.example.com |
| 196 | +``` |
| 197 | + |
| 198 | +Custom hosts are also supported via following shorthand: |
209 | 199 |
|
| 200 | +```yaml |
| 201 | +# values.yaml |
210 | 202 | global: |
211 | | - host: backstage.apps.example.com |
| 203 | + host: backstage.example.com |
| 204 | +``` |
| 205 | + |
| 206 | +Please note this is just a templating shorthand. For full manual configuration please pay attention to values under `route` key. |
| 207 | + |
| 208 | +Please note that any custom modifications to how backstage is being exposed may require additional changes to values: |
| 209 | + |
| 210 | +```yaml |
| 211 | +# values.yaml |
| 212 | +upstream: |
| 213 | + appConfig: |
| 214 | + app: |
| 215 | + baseUrl: 'https://{{- include "janus-idp.hostname" . }}' |
| 216 | + backend: |
| 217 | + baseUrl: 'https://{{- include "janus-idp.hostname" . }}' |
| 218 | + cors: |
| 219 | + origin: 'https://{{- include "janus-idp.hostname" . }}' |
212 | 220 | ``` |
0 commit comments