Skip to content

Commit

Permalink
feat: use PVC for dynamic-plugins-root (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
kadel committed Aug 22, 2024
1 parent 5786116 commit 507daf6
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 40 deletions.
2 changes: 1 addition & 1 deletion charts/backstage/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,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.17.0
version: 2.18.0
6 changes: 2 additions & 4 deletions charts/backstage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# RHDH Backstage Helm Chart for OpenShift (Community Version)

[![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.17.0](https://img.shields.io/badge/Version-2.17.0-informational?style=flat-square)
![Version: 2.18.0](https://img.shields.io/badge/Version-2.18.0-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

A Helm chart for deploying Red Hat Developer Hub.

The telemetry data collection feature is enabled by default. Red Hat Developer Hub sends telemetry data to Red Hat by using the `backstage-plugin-analytics-provider-segment` plugin. To disable this and to learn what data is being collected, see https://access.redhat.com/documentation/en-us/red_hat_developer_hub/1.2/html-single/administration_guide_for_red_hat_developer_hub/index#assembly-rhdh-telemetry_admin-rhdh
The telemetry data collection feature is enabled by default. Red Hat Developer Hub sends telemetry data to Red Hat by using the `backstage-plugin-analytics-provider-segment` plugin. To disable this and to learn what data is being collected, see https://access.redhat.com/documentation/en-us/red_hat_developer_hub/1.3/html-single/administration_guide_for_red_hat_developer_hub/index#assembly-rhdh-telemetry_admin-rhdh

**Homepage:** <https://redhat-developer.github.io/rhdh-chart/>

Expand Down Expand Up @@ -166,8 +166,6 @@ Kubernetes: `>= 1.25.0-0`
| route.tls.termination | Specify TLS termination. | string | `"edge"` |
| route.wildcardPolicy | Wildcard policy if any for the route. Currently only 'Subdomain' or 'None' is allowed. | string | `"None"` |
| upstream | Upstream Backstage [chart configuration](https://github.com/backstage/charts/blob/main/charts/backstage/values.yaml) | object | Use Openshift compatible settings |
| upstream.backstage.extraVolumes[0] | Ephemeral volume that will contain the dynamic plugins installed by the initContainer below at start. | object | `{"ephemeral":{"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"2Gi"}}}}},"name":"dynamic-plugins-root"}` |
| 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` |

## Opinionated Backstage deployment
Expand Down
10 changes: 0 additions & 10 deletions charts/backstage/templates/pvc.yaml

This file was deleted.

21 changes: 21 additions & 0 deletions charts/backstage/templates/pvcs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ printf "%s-audit-log" .Release.Name }}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ printf "%s-dynamic-plugins-root" .Release.Name }}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
19 changes: 4 additions & 15 deletions charts/backstage/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2576,21 +2576,10 @@
"extraVolumes": {
"default": [
{
"ephemeral": {
"volumeClaimTemplate": {
"spec": {
"accessModes": [
"ReadWriteOnce"
],
"resources": {
"requests": {
"storage": "2Gi"
}
}
}
}
},
"name": "dynamic-plugins-root"
"name": "dynamic-plugins-root",
"persistentVolumeClaim": {
"claimName": "{{ printf \"%s-dynamic-plugins-root\" .Release.Name }}"
}
},
{
"name": "audit-log-data",
Expand Down
12 changes: 2 additions & 10 deletions charts/backstage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,9 @@ upstream:
- name: audit-log-data
mountPath: /var/log/audit
extraVolumes:
# -- Ephemeral volume that will contain the dynamic plugins installed by the initContainer below at start.
- name: dynamic-plugins-root
ephemeral:
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
# -- Size of the volume that will contain the dynamic plugins. It should be large enough to contain all the plugins.
storage: 2Gi
persistentVolumeClaim:
claimName: '{{ printf "%s-dynamic-plugins-root" .Release.Name }}'
- name: audit-log-data
persistentVolumeClaim:
claimName: '{{ printf "%s-audit-log" .Release.Name }}'
Expand Down

0 comments on commit 507daf6

Please sign in to comment.