You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 2, 2024. It is now read-only.
feat: add fallback value for janus-idp.hostname for openshift clusters (#169)
* feat: add fallback value for janus-idp.hostname for openshift clusters
* chore: update defaults, documentation and update errors to be more verbose
* chore: update tests for new default value of `global.clusterRouterBase`
* chore: update docs and error message
Once the chart has been added, install this chart. However before doing so, please review the default `values.yaml` and adjust as needed.
72
72
73
-
- To get proper connection between frontend and backend of Backstage please update the `apps.example.com` to match your cluster host:
74
-
75
-
```yaml
76
-
global:
77
-
clusterRouterBase: apps.example.com
78
-
```
79
-
80
-
> Tip: you can use `helm upgrade -i --set global.clusterRouterBase=apps.example.com ...` instead of a value file
81
-
82
73
- If your cluster doesn't provide PVCs, you should disable PostgreSQL persistence via:
83
74
84
75
```yaml
@@ -132,12 +123,12 @@ Kubernetes: `>= 1.19.0-0`
132
123
| global.auth.backend | Backend service to service authentication <br /> Ref: https://backstage.io/docs/auth/service-to-service-auth/| object |`{"enabled":true,"existingSecret":"","value":""}`|
133
124
| global.auth.backend.enabled | Enable backend service to service authentication, unless configured otherwise it generates a secret value | bool |`true`|
134
125
| global.auth.backend.existingSecret | Instead of generating a secret value, refer to existing secret | string |`""`|
135
-
| global.auth.backend.value | Instead of generating a secret value, use fo;lowing value | string | `""` |
136
-
| 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"` |
126
+
| global.auth.backend.value | Instead of generating a secret value, use the following value | string |`""`|
127
+
| 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 |`""`|
137
128
| global.dynamic.includes | Array of YAML files listing dynamic plugins to include with those listed in the `plugins` field. Relative paths are resolved from the working directory of the initContainer that will install the plugins (`/opt/app-root/src`). | list |`["dynamic-plugins.default.yaml"]`|
138
129
| global.dynamic.includes[0]| List of dynamic plugins included inside the `janus-idp/backstage-showcase` container image, some of which are disabled by default. This file ONLY works with the `janus-idp/backstage-showcase` container image. | string |`"dynamic-plugins.default.yaml"`|
139
130
| global.dynamic.plugins | List of dynamic plugins, possibly overriding the plugins listed in `includes` files. Every item defines the plugin `package` as a [NPM package spec](https://docs.npmjs.com/cli/v10/using-npm/package-spec), an optional `pluginConfig` with plugin-specific backstage configuration, and an optional `disabled` flag to disable/enable a plugin listed in `includes` files. It also includes an `integrity` field that is used to verify the plugin package [integrity](https://w3c.github.io/webappsec-subresource-integrity/#integrity-metadata-description). | list |`[]`|
140
-
| global.host | Custom hostname shorthand, overrides `global.clusterRouterBase`, `upstream.ingress.host`, `route.host`, and url values in `upstream.backstage.appConfig` | string | `""` |
131
+
| global.host | Custom hostname shorthand, overrides `global.clusterRouterBase`, `upstream.ingress.host`, `route.host`, and url values in `upstream.backstage.appConfig`. If neither `global.clusterRouterBase` nor `global.host` are set, the helm chart will attempt to autofill with the hostname of the [OCP Ingress configuration](https://access.redhat.com/documentation/en-us/openshift_container_platform/4.14/html/networking/configuring-ingress#nw-installation-ingress-config-asset_configuring-ingress)| string |`""`|
For additional instance features please consuls [documentation for `janus-idp/backstage-showcase`](https://github.com/janus-idp/backstage-showcase/).
161
+
For additional instance features please consult the [documentation for `janus-idp/backstage-showcase`](https://github.com/janus-idp/backstage-showcase/tree/main/showcase-docs).
171
162
172
163
Additional features can be enabled by extending the default configuration at:
173
164
@@ -182,9 +173,9 @@ upstream:
182
173
183
174
## Features
184
175
185
-
This charts defaults to using the Janus-IDP Backstage Showcase image that is OpenShift compatible:
176
+
This charts defaults to using the [latest Janus-IDP Backstage Showcase image](https://quay.io/janus-idp/backstage-showcase:latest) that is OpenShift compatible:
186
177
187
-
```
178
+
```console
188
179
quay.io/janus-idp/backstage-showcase:latest
189
180
```
190
181
@@ -194,29 +185,35 @@ Additionally this chart enhances the upstream Backstage chart with following Ope
194
185
195
186
This chart offers a drop-in replacement for the `Ingress` resource already provided by the upstream chart via an OpenShift `Route`.
196
187
197
-
OpenShift routes are enabled by default. In order to use the chart without it, please switch to the `Ingress` resource via `upstream.ingress` values.
188
+
OpenShift routes are enabled by default. In order to use the chart without it, please set `route.enabled` to `false` and switch to the `Ingress` resource via `upstream.ingress` values.
198
189
199
-
Routes can be further configured via the `route` value.
190
+
Routes can be further configured via the `route`field.
200
191
201
-
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:
192
+
By default, the chart expects you to expose Backstage via the autogenerated hostname, which is automatically obtained from the OpenShift Ingress Configurations.
193
+
194
+
To manually provide the Backstage pod with the right context, please add the following value:
202
195
203
196
```yaml
204
197
# values.yaml
205
198
global:
206
199
clusterRouterBase: apps.example.com
207
200
```
208
201
209
-
Custom hosts are also supported via following shorthand:
202
+
> Tip: you can use `helm upgrade -i --set global.clusterRouterBase=apps.example.com ...` instead of a value file
203
+
204
+
Custom hosts are also supported via the following shorthand:
210
205
211
206
```yaml
212
207
# values.yaml
213
208
global:
214
209
host: backstage.example.com
215
210
```
216
211
217
-
Please note this is just a templating shorthand. For full manual configuration please pay attention to values under `route` key.
212
+
> Note: Setting either `global.host` or `global.clusterRouterBase` will disable the automatic hostname discovery.
213
+
When both fields are set, `global.host` will take precedence.
214
+
These are just templating shorthands. For full manual configuration please pay attention to values under the `route` key.
218
215
219
-
Please note that any custom modifications to how backstage is being exposed may require additional changes to values:
216
+
Any custom modifications to how backstage is being exposed may require additional changes to the `values.yaml`:
220
217
221
218
```yaml
222
219
# values.yaml
@@ -233,12 +230,12 @@ upstream:
233
230
234
231
### Vanilla Kubernetes compatibility mode
235
232
236
-
In order to deploy this chart on vanilla Kubernetes or any other non-OCP platform, please make sure to apply following changes. Further customization may be required, depending on your exact Kubernetes setup:
233
+
In order to deploy this chart on vanilla Kubernetes or any other non-OCP platform, please make sure to apply the following changes. Note that further customizations may be required, depending on your exact Kubernetes setup:
237
234
238
235
```yaml
239
236
# values.yaml
240
237
global:
241
-
host: # Specify your own Ingress host
238
+
host: # Specify your own Ingress host as automatic hostname discovery is not supported outside of OpenShift
242
239
route:
243
240
enabled: false # OpenShift Routes do not exist on vanilla Kubernetes
For additional instance features please consuls [documentation for `janus-idp/backstage-showcase`](https://github.com/janus-idp/backstage-showcase/).
117
+
For additional instance features please consult the [documentation for `janus-idp/backstage-showcase`](https://github.com/janus-idp/backstage-showcase/tree/main/showcase-docs).
127
118
128
119
Additional features can be enabled by extending the default configuration at:
129
120
@@ -138,9 +129,9 @@ upstream:
138
129
139
130
## Features
140
131
141
-
This charts defaults to using the Janus-IDP Backstage Showcase image that is OpenShift compatible:
132
+
This charts defaults to using the [latest Janus-IDP Backstage Showcase image](https://quay.io/janus-idp/backstage-showcase:latest) that is OpenShift compatible:
142
133
143
-
```
134
+
```console
144
135
quay.io/janus-idp/backstage-showcase:latest
145
136
```
146
137
@@ -150,29 +141,35 @@ Additionally this chart enhances the upstream Backstage chart with following Ope
150
141
151
142
This chart offers a drop-in replacement for the `Ingress` resource already provided by the upstream chart via an OpenShift `Route`.
152
143
153
-
OpenShift routes are enabled by default. In order to use the chart without it, please switch to the `Ingress` resource via `upstream.ingress` values.
144
+
OpenShift routes are enabled by default. In order to use the chart without it, please set `route.enabled` to `false` and switch to the `Ingress` resource via `upstream.ingress` values.
154
145
155
-
Routes can be further configured via the `route` value.
146
+
Routes can be further configured via the `route` field.
156
147
157
-
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:
148
+
By default, the chart expects you to expose Backstage via the autogenerated hostname, which is automatically obtained from the OpenShift Ingress Configurations.
149
+
150
+
To manually provide the Backstage pod with the right context, please add the following value:
158
151
159
152
```yaml
160
153
# values.yaml
161
154
global:
162
155
clusterRouterBase: apps.example.com
163
156
```
164
157
165
-
Custom hosts are also supported via following shorthand:
158
+
> Tip: you can use `helm upgrade -i --set global.clusterRouterBase=apps.example.com ...` instead of a value file
159
+
160
+
Custom hosts are also supported via the following shorthand:
166
161
167
162
```yaml
168
163
# values.yaml
169
164
global:
170
165
host: backstage.example.com
171
166
```
172
167
173
-
Please note this is just a templating shorthand. For full manual configuration please pay attention to values under `route` key.
168
+
> Note: Setting either `global.host` or `global.clusterRouterBase` will disable the automatic hostname discovery.
169
+
When both fields are set, `global.host` will take precedence.
170
+
These are just templating shorthands. For full manual configuration please pay attention to values under the `route` key.
174
171
175
-
Please note that any custom modifications to how backstage is being exposed may require additional changes to values:
172
+
Any custom modifications to how backstage is being exposed may require additional changes to the `values.yaml`:
176
173
177
174
```yaml
178
175
# values.yaml
@@ -190,12 +187,12 @@ upstream:
190
187
191
188
### Vanilla Kubernetes compatibility mode
192
189
193
-
In order to deploy this chart on vanilla Kubernetes or any other non-OCP platform, please make sure to apply following changes. Further customization may be required, depending on your exact Kubernetes setup:
190
+
In order to deploy this chart on vanilla Kubernetes or any other non-OCP platform, please make sure to apply the following changes. Note that further customizations may be required, depending on your exact Kubernetes setup:
194
191
195
192
```yaml
196
193
# values.yaml
197
194
global:
198
-
host: # Specify your own Ingress host
195
+
host: # Specify your own Ingress host as automatic hostname discovery is not supported outside of OpenShift
199
196
route:
200
197
enabled: false # OpenShift Routes do not exist on vanilla Kubernetes
Attempt to obtain a fallback value for the hostname from the openshift cluster if both global.host and global.clusterRouterBase are ""andif deployed on Openshift
{{ fail "Unable to generate hostname, OCP Ingress Resource is missing `spec.domain` field. Please provide a valid hostname in `global.host` or `global.clusterRouterBase` instead"}}
18
+
{{- end }}
9
19
{{- else -}}
10
-
{{ fail "Unable to generate hostname"}}
20
+
{{ fail "Unable to generate hostname, please provide a valid hostname in `global.host` or `global.clusterRouterBase`"}}
Copy file name to clipboardExpand all lines: charts/backstage/values.schema.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@
21
21
},
22
22
"value": {
23
23
"default": "",
24
-
"title": "Instead of generating a secret value, use fo;lowing value",
24
+
"title": "Instead of generating a secret value, use the following value",
25
25
"type": "string"
26
26
}
27
27
},
@@ -33,7 +33,7 @@
33
33
"type": "object"
34
34
},
35
35
"clusterRouterBase": {
36
-
"default": "apps.example.com",
36
+
"default": "",
37
37
"title": "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.",
Copy file name to clipboardExpand all lines: charts/backstage/values.schema.tmpl.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@
23
23
"clusterRouterBase": {
24
24
"title": "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.",
25
25
"type": "string",
26
-
"default": "apps.example.com"
26
+
"default": ""
27
27
},
28
28
"host": {
29
29
"title": "Custom hostname shorthand, overrides `global.clusterRouterBase`, `upstream.ingress.host`, `route.host`, and url values in `upstream.backstage.appConfig`",
@@ -93,7 +93,7 @@
93
93
"default": ""
94
94
},
95
95
"value": {
96
-
"title": "Instead of generating a secret value, use fo;lowing value",
96
+
"title": "Instead of generating a secret value, use the following value",
0 commit comments