From 507daf6d9d4a56902fccb19c4fa99887e11a09b3 Mon Sep 17 00:00:00 2001 From: Tomas Kral Date: Thu, 22 Aug 2024 18:19:17 +0200 Subject: [PATCH] feat: use PVC for dynamic-plugins-root (#40) --- charts/backstage/Chart.yaml | 2 +- charts/backstage/README.md | 6 ++---- charts/backstage/templates/pvc.yaml | 10 ---------- charts/backstage/templates/pvcs.yaml | 21 +++++++++++++++++++++ charts/backstage/values.schema.json | 19 ++++--------------- charts/backstage/values.yaml | 12 ++---------- 6 files changed, 30 insertions(+), 40 deletions(-) delete mode 100644 charts/backstage/templates/pvc.yaml create mode 100644 charts/backstage/templates/pvcs.yaml diff --git a/charts/backstage/Chart.yaml b/charts/backstage/Chart.yaml index 1063d5d2..fac04718 100644 --- a/charts/backstage/Chart.yaml +++ b/charts/backstage/Chart.yaml @@ -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 diff --git a/charts/backstage/README.md b/charts/backstage/README.md index 43414960..e2fd48cc 100644 --- a/charts/backstage/README.md +++ b/charts/backstage/README.md @@ -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:** @@ -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 diff --git a/charts/backstage/templates/pvc.yaml b/charts/backstage/templates/pvc.yaml deleted file mode 100644 index c889ced2..00000000 --- a/charts/backstage/templates/pvc.yaml +++ /dev/null @@ -1,10 +0,0 @@ -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ printf "%s-audit-log" .Release.Name }} -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi diff --git a/charts/backstage/templates/pvcs.yaml b/charts/backstage/templates/pvcs.yaml new file mode 100644 index 00000000..4f85c39e --- /dev/null +++ b/charts/backstage/templates/pvcs.yaml @@ -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 \ No newline at end of file diff --git a/charts/backstage/values.schema.json b/charts/backstage/values.schema.json index 4015bd39..612d672f 100644 --- a/charts/backstage/values.schema.json +++ b/charts/backstage/values.schema.json @@ -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", diff --git a/charts/backstage/values.yaml b/charts/backstage/values.yaml index 919b18f1..e7b3625d 100644 --- a/charts/backstage/values.yaml +++ b/charts/backstage/values.yaml @@ -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 }}'