Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Make the dynamic plugins root PVC storage class configurable [RHDHBUGS-156][RHIDP-5573] #69

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,19 @@ jobs:
- name: Create KIND Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0

- name: Create custom storage class
run: |
cat <<EOF | kubectl apply -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: custom-sc
# same provisioner as the one used by the default storage class on KinD
provisioner: rancher.io/local-path
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
EOF

- name: Install Ingress Controller
run: "helm install ingress-nginx/ingress-nginx --generate-name --set controller.service.type='NodePort' --set controller.admissionWebhooks.enabled=false"

Expand Down Expand Up @@ -105,6 +118,19 @@ jobs:
- name: Create KIND Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0

- name: Create custom storage class
run: |
cat <<EOF | kubectl apply -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: custom-sc
# same provisioner as the one used by the default storage class on KinD
provisioner: rancher.io/local-path
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
EOF

- name: Install Ingress Controller
run: "helm install ingress-nginx/ingress-nginx --generate-name --set controller.service.type='NodePort' --set controller.admissionWebhooks.enabled=false"

Expand Down
2 changes: 1 addition & 1 deletion charts/backstage/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,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.27.0
version: 2.28.0
3 changes: 2 additions & 1 deletion 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 (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.27.0](https://img.shields.io/badge/Version-2.27.0-informational?style=flat-square)
![Version: 2.28.0](https://img.shields.io/badge/Version-2.28.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.
Expand Down Expand Up @@ -141,6 +141,7 @@ Kubernetes: `>= 1.25.0-0`

| Key | Description | Type | Default |
|-----|-------------|------|---------|
| dynamicPlugins.cache.volumeClaimSpec | Spec of the dynamic plugins root volume claim. <br/> Note that, by default, this is set to use the default storage class, if available in the cluster. | object | `{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"5Gi"}},"storageClassName":null}` |
| global.auth | Enable service authentication within Backstage instance | object | `{"backend":{"enabled":true,"existingSecret":"","value":""}}` |
| global.auth.backend | Backend service to service authentication <br /> Ref: https://backstage.io/docs/auth/service-to-service-auth/ | object | `{"enabled":true,"existingSecret":"","value":""}` |
| global.auth.backend.enabled | Enable backend service to service authentication, unless configured otherwise it generates a secret value | bool | `true` |
Expand Down
18 changes: 18 additions & 0 deletions charts/backstage/ci/with-custom-dynamic-pvc-claim-spec-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Workaround for kind cluster in CI which has no Routes
route:
enabled: false
upstream:
postgresql:
primary:
persistence:
# This custom-sc storage class is created in the test GH Workflow
storageClass: custom-sc

dynamicPlugins:
cache:
volumeClaimSpec:
resources:
requests:
storage: 3Gi
# This custom-sc storage class is created in the test GH Workflow
storageClassName: custom-sc
6 changes: 1 addition & 5 deletions charts/backstage/templates/pvcs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,4 @@ apiVersion: v1
metadata:
name: {{ printf "%s-dynamic-plugins-root" .Release.Name }}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
{{- toYaml .Values.dynamicPlugins.cache.volumeClaimSpec | nindent 2 }}
13 changes: 13 additions & 0 deletions charts/backstage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ upstream:
enabled: true
size: 1Gi
mountPath: /var/lib/pgsql/data
storageClass: null
extraEnvVars:
- name: POSTGRESQL_ADMIN_PASSWORD
valueFrom:
Expand Down Expand Up @@ -307,3 +308,15 @@ route:
# -- Indicates the desired behavior for insecure connections to a route.
# <br /> While each router may make its own decisions on which ports to expose, this is normally port 80. The only valid values are None, Redirect, or empty for disabled.
insecureEdgeTerminationPolicy: "Redirect"

dynamicPlugins:
cache:
# -- Spec of the dynamic plugins root volume claim.
# <br/> Note that, by default, this is set to use the default storage class, if available in the cluster.
volumeClaimSpec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: null
gazarenkov marked this conversation as resolved.
Show resolved Hide resolved
Loading