Skip to content

Commit 90e38f1

Browse files
authored
Add storage configuration for nooba & quay components (#78)
Signed-off-by: Manuel Lorenzo <mlorenzofr@redhat.com>
1 parent d34fca0 commit 90e38f1

File tree

7 files changed

+64
-25
lines changed

7 files changed

+64
-25
lines changed

DEVELOPMENT.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,27 @@ oc patch oauth cluster --type json -p='[{"op": "remove", "path": "/spec/token
5050

5151
The updated setting will become enabled upon next login.
5252

53+
### Reducing the storage required
54+
55+
By default, NooBaa requires 100 Gi of disk space: 50 Gi for the database and 50 Gi for the default `BackingStore`. While this might make sense for production, in our development environment we will only be using a few images for testing, so it may be excessive.
56+
57+
If we want to save some space, we can add these overrides to the `noobaa-mcg` component in the `values-hub.yaml` file:
58+
59+
```yaml
60+
noobaa-mcg:
61+
name: noobaa-mcg
62+
namespace: openshift-storage
63+
project: hub
64+
path: charts/noobaa-mcg
65+
annotations:
66+
argocd.argoproj.io/sync-wave: "5"
67+
overrides:
68+
- name: noobaa.dbSize
69+
value: 10Gi
70+
- name: noobaa.pvPool.resources.requests.storage
71+
value: 25Gi
72+
```
73+
5374
## Analytics Tracking
5475
5576
Metrics are captured to track the use of any of the Validated Patterns. It is important than an accurate depiction of pattern use by customers, partners and those from the community are captured. Red Hat associates should not factor into this calculation and support is available in the Validated Patterns framework to opt out of being captured.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: noobaa.io/v1alpha1
2+
kind: BackingStore
3+
metadata:
4+
name: noobaa-default-backing-store
5+
namespace: {{ .Values.noobaa.namespace }}
6+
annotations:
7+
argocd.argoproj.io/sync-wave: "1"
8+
spec:
9+
type: pv-pool
10+
pvPool:
11+
numVolumes: {{ .Values.noobaa.pvPool.numVolumes | default 1 }}
12+
resources:
13+
requests:
14+
cpu: {{ .Values.noobaa.pvPool.resources.requests.cpu | quote }}
15+
memory: {{ .Values.noobaa.pvPool.resources.requests.memory | quote }}
16+
storage: {{ .Values.noobaa.pvPool.resources.requests.storage }}
17+
limits:
18+
cpu: {{ .Values.noobaa.pvPool.resources.limits.cpu | quote }}
19+
memory: {{ .Values.noobaa.pvPool.resources.limits.memory | quote }}

charts/noobaa-mcg/templates/noobaa-system.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ spec:
1212
operator: "Equal"
1313
value: "true"
1414
effect: "NoSchedule"
15+
dbVolumeResources:
16+
requests:
17+
storage: {{ .Values.noobaa.dbSize }}

charts/noobaa-mcg/values.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,13 @@ noobaa:
1313
tiers:
1414
- backingStores:
1515
- noobaa-default-backing-store
16+
dbSize: 50Gi # Default size for NooBaa DB is 50 Gi
17+
pvPool:
18+
resources:
19+
requests:
20+
cpu: 800m
21+
memory: 800Mi
22+
storage: 50Gi # Default size for NooBaa PV Pool is 50 Gi
23+
limits:
24+
cpu: 1
25+
memory: 4Gi

charts/quay-registry/templates/quay-registry.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ spec:
1818
managed: true
1919
- kind: postgres
2020
managed: true
21+
overrides:
22+
volumeSize: {{ .Values.quay.storage.postgres.size }}
2123
- kind: redis
2224
managed: true
2325
- kind: objectstorage
@@ -30,5 +32,7 @@ spec:
3032
managed: true
3133
- kind: clairpostgres
3234
managed: true
35+
overrides:
36+
volumeSize: {{ .Values.quay.storage.clairpostgres.size }}
3337
# Use the secret created by the S3 job (with real credentials), not the Git-managed template
34-
configBundleSecret: quay-config-with-s3
38+
configBundleSecret: quay-config-with-s3

charts/quay-registry/values.yaml

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,5 @@
11
quay:
22
namespace: quay-enterprise
3-
component:
4-
- name: clair
5-
managed: true
6-
- name: horizontalpodautoscaler
7-
managed: true
8-
- name: mirror
9-
managed: true
10-
- name: monitoring
11-
managed: true
12-
- name: postgres
13-
managed: true
14-
- name: redis
15-
managed: true
16-
- name: objectstorage
17-
managed: false
18-
- name: route
19-
managed: true
20-
- name: tls
21-
managed: true
22-
- name: quay
23-
managed: true
24-
- name: clairpostgres
25-
managed: true
263
configBundleSecret:
274
deploy: true
285
name: quay-init-config-bundle-secret
@@ -33,6 +10,11 @@ quay:
3310
user:
3411
name: developer1
3512
email: developer1@myorg.com
13+
storage:
14+
postgres:
15+
size: 50Gi # Default and minimum size is 50 Gi
16+
clairpostgres:
17+
size: 50Gi # Default and minimum size is 50 Gi
3618

3719
job:
3820
image: registry.redhat.io/openshift4/ose-cli:latest

values-hub.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ clusterGroup:
225225
# quay-registry:
226226
# name: quay-registry
227227
# namespace: quay-enterprise
228-
# project: hub
228+
# project: hub
229229
# path: charts/quay-registry
230230
# annotations:
231231
# argocd.argoproj.io/sync-wave: "10" # Deploy after NooBaa storage backend

0 commit comments

Comments
 (0)