Skip to content

Commit

Permalink
chore: set NODE_OPTIONS=--no-node-snapshot env variable by default
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Kong <[email protected]>
  • Loading branch information
Frank Kong committed May 27, 2024
1 parent bf926d8 commit 0972228
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/backstage/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ sources:
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.15.2
version: 2.15.3
10 changes: 6 additions & 4 deletions charts/backstage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# RHDH Backstage Helm Chart for OpenShift

[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/rhdh-chart&style=flat-square)](https://artifacthub.io/packages/search?repo=rhdh-chart)
![Version: 2.15.0](https://img.shields.io/badge/Version-2.15.0-informational?style=flat-square)
![Version: 2.15.3](https://img.shields.io/badge/Version-2.15.3-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

A Helm chart for deploying RHDH (a Backstage application)
Expand Down Expand Up @@ -111,10 +111,10 @@ helm upgrade -i <release_name> oci://ghcr.io/redhat-developer/rhdh-chart/backsta

### Uninstalling the Chart

To uninstall/delete the `my-backstage` deployment:
To uninstall/delete the `my-backstage-release` deployment:

```console
helm uninstall my-backstage
helm uninstall my-backstage-release
```

The command removes all the Kubernetes components associated with the chart and deletes the release.
Expand All @@ -141,7 +141,7 @@ Kubernetes: `>= 1.25.0-0`
| 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"]` |
| 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"` |
| 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 | `[]` |
| global.host | Custom hostname shorthand, overrides `global.clusterRouterBase`, `upstream.ingress.host`, `route.host`, and url values in `upstream.backstage.appConfig`. | string | `""` |
| global.host | Custom hostname shorthand, overrides `global.clusterRouterBase`, `upstream.ingress.host`, `route.host`, and url values in `upstream.backstage.appConfig`. | string | `""` |
| 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"}` |
| route.annotations | Route specific annotations | object | `{}` |
| route.enabled | Enable the creation of the route resource | bool | `true` |
Expand All @@ -161,6 +161,8 @@ Kubernetes: `>= 1.25.0-0`
| upstream.backstage.extraVolumes[0].ephemeral.volumeClaimTemplate.spec.resources.requests.storage | Size of the volume that will contain the dynamic plugins. It should be large enough to contain all the plugins. | string | `"2Gi"` |
| upstream.backstage.initContainers[0].image | Image used by the initContainer to install dynamic plugins into the `dynamic-plugins-root` volume mount. It could be replaced by a custom image based on this one. | string | `quay.io/janus-idp/backstage-showcase:latest` |

**Note**: The `NODE_OPTIONS=--no-node-snapshot` environmental is set by default to enable the usage of the scaffolder for backstage instances running on NodeJS 20.x or later.

## Opinionated Backstage deployment

This chart defaults to an opinionated deployment of Backstage that provides user with a usable Backstage instance out of the box.
Expand Down
2 changes: 2 additions & 0 deletions charts/backstage/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ The command removes all the Kubernetes components associated with the chart and

{{ template "chart.valuesSection" . }}

**Note**: The `NODE_OPTIONS=--no-node-snapshot` environmental is set by default to enable the usage of the scaffolder for backstage instances running on NodeJS 20.x or later.

## Opinionated Backstage deployment

This chart defaults to an opinionated deployment of Backstage that provides user with a usable Backstage instance out of the box.
Expand Down
6 changes: 5 additions & 1 deletion charts/backstage/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2367,6 +2367,10 @@
"name": "{{- include \"janus-idp.postgresql.secretName\" . }}"
}
}
},
{
"name": "NODE_OPTIONS",
"value": "--no-node-snapshot"
}
],
"examples": [
Expand Down Expand Up @@ -6996,4 +7000,4 @@
},
"title": "Root Schema",
"type": "object"
}
}
3 changes: 3 additions & 0 deletions charts/backstage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ upstream:
secretKeyRef:
key: postgres-password
name: '{{- include "janus-idp.postgresql.secretName" . }}'
- name: NODE_OPTIONS
# This enables the usage of the scaffolder for NodeJS 20 backstage instances
value: '--no-node-snapshot'

args:
# This additional `app-config`` file is generated by the initContainer below, and contains the merged configuration of installed dynamic plugins.
Expand Down

0 comments on commit 0972228

Please sign in to comment.