From 601663c8c39cff31f5dd4dbfafe9bc1cb3743c47 Mon Sep 17 00:00:00 2001 From: Romain Arnaud Date: Tue, 11 Feb 2025 10:44:01 -0500 Subject: [PATCH] feat: add a PVC for DH plugins This speeds up DH restarts as the plugins are not downloaded on every restart, and instead are cached to persistent storage. cf https://docs.redhat.com/en/documentation/red_hat_developer_hub/1.4/html/configuring/con-dynamic-plugin-cache_running-behind-a-proxy#enabling-the-dynamic-plugins-cache rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED --- installer/charts/rhtap-dh/templates/backstage.yaml | 10 ++++++++++ .../charts/rhtap-dh/templates/plugins-cache.yaml | 11 +++++++++++ 2 files changed, 21 insertions(+) create mode 100644 installer/charts/rhtap-dh/templates/plugins-cache.yaml diff --git a/installer/charts/rhtap-dh/templates/backstage.yaml b/installer/charts/rhtap-dh/templates/backstage.yaml index 6f6c398b..0b8e1771 100644 --- a/installer/charts/rhtap-dh/templates/backstage.yaml +++ b/installer/charts/rhtap-dh/templates/backstage.yaml @@ -18,3 +18,13 @@ spec: enabled: true database: enableLocalDb: true + deployment: + patch: + spec: + template: + spec: + volumes: + - $patch: replace + name: dynamic-plugins-root + persistentVolumeClaim: + claimName: {{ .Values.developerHub.instanceName }}-dynamic-plugins-root diff --git a/installer/charts/rhtap-dh/templates/plugins-cache.yaml b/installer/charts/rhtap-dh/templates/plugins-cache.yaml new file mode 100644 index 00000000..f89684c2 --- /dev/null +++ b/installer/charts/rhtap-dh/templates/plugins-cache.yaml @@ -0,0 +1,11 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ .Values.developerHub.instanceName }}-dynamic-plugins-root + namespace: {{ .Release.Namespace }} +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Gi