Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

fix: increase default size of the dynamic-plugins-root volume from 1Gi to 2Gi #238

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
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ data:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storage: 2Gi
name: dynamic-plugins-root
- name: dynamic-plugins-npmrc
secret:
Expand Down
2 changes: 1 addition & 1 deletion config/manager/default-config/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storage: 2Gi
name: dynamic-plugins-root
- name: dynamic-plugins-npmrc
secret:
Expand Down
12 changes: 11 additions & 1 deletion controllers/backstage_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/utils/pointer"
Expand Down Expand Up @@ -299,8 +300,17 @@ var _ = Describe("Backstage controller", func() {
By("Checking the Volumes in the Backstage Deployment", func() {
Expect(found.Spec.Template.Spec.Volumes).To(HaveLen(4))

_, ok := findVolume(found.Spec.Template.Spec.Volumes, "dynamic-plugins-root")
dpRootVol, ok := findVolume(found.Spec.Template.Spec.Volumes, "dynamic-plugins-root")
Expect(ok).To(BeTrue(), "No volume found with name: dynamic-plugins-root")
Expect(dpRootVol.Ephemeral).ShouldNot(BeNil())
Expect(dpRootVol.Ephemeral.VolumeClaimTemplate).ShouldNot(BeNil())
storage := dpRootVol.Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests.Storage()
Expect(storage).ShouldNot(BeNil())
q, pErr := resource.ParseQuantity("1Gi")
Expect(pErr).ShouldNot(HaveOccurred())
// https://issues.redhat.com/browse/RHIDP-1332: storage size should be > 1Gi
Expect(storage.Cmp(q)).To(Equal(1),
"storage size for dynamic-plugins-root volume is currently %v, but it should be more than %v", storage, q)

_, ok = findVolume(found.Spec.Template.Spec.Volumes, "dynamic-plugins-npmrc")
Expect(ok).To(BeTrue(), "No volume found with name: dynamic-plugins-npmrc")
Expand Down