Skip to content

Commit faddf8b

Browse files
mbaldessaridarkdoc
andcommitted
Allow failureDomain to be overridden
This is needed because the default `zone` will only work when a cluster is deployed across multiple availability zones. In cases when a cluster is deployed in a single AZ, this value can be changed to something else (`host` or `rack`). Co-Authored-By: Akos Eros <[email protected]>
1 parent e7d754d commit faddf8b

File tree

4 files changed

+92
-3
lines changed

4 files changed

+92
-3
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# openshift-data-foundations
22

3-
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)
3+
![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)
44

55
A Helm chart to install ODF on Openshift
66

@@ -18,9 +18,11 @@ A Helm chart to install ODF on Openshift
1818
|-----|------|---------|-------------|
1919
| global.datacenter.storageClassName | string | `"gp3-csi"` | |
2020
| job.image | string | `"image-registry.openshift-image-registry.svc:5000/openshift/cli:latest"` | |
21+
| objectStorage.dataPool.failureDomain | string | `"zone"` | Failuredomain for the dataPool |
2122
| objectStorage.dataPool.replicas | int | `3` | |
2223
| objectStorage.enable | bool | `true` | |
2324
| objectStorage.gateway.instances | int | `2` | |
25+
| objectStorage.metadataPool.failureDomain | string | `"zone"` | Failuredomain for the metadataPool |
2426
| objectStorage.resources.limits.cpu | string | `"2"` | |
2527
| objectStorage.resources.limits.memory | string | `"6Gi"` | |
2628
| objectStorage.resources.requests.cpu | string | `"1"` | |

templates/odf-cephobjectstore.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ spec:
99
erasureCoded:
1010
codingChunks: 0
1111
dataChunks: 0
12-
failureDomain: zone
12+
failureDomain: {{ .Values.objectStorage.dataPool.failureDomain }}
1313
replicated:
1414
size: {{ .Values.objectStorage.dataPool.replicas | default 3 }}
1515
gateway:
@@ -50,7 +50,7 @@ spec:
5050
erasureCoded:
5151
codingChunks: 0
5252
dataChunks: 0
53-
failureDomain: zone
53+
failureDomain: {{ .Values.objectStorage.metadataPool.failureDomain }}
5454
replicated:
5555
size: 3
5656
{{- end -}}

tests/odf_cephobjectstore_test.yaml

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
suite: Test CephObjectStore
2+
templates:
3+
- templates/odf-cephobjectstore.yaml
4+
release:
5+
name: release-test
6+
tests:
7+
- it: Should output nothing when disabled
8+
set:
9+
objectStorage:
10+
enable: false
11+
asserts:
12+
- hasDocuments:
13+
count: 0
14+
15+
- it: Should output default values when not disabled
16+
asserts:
17+
- hasDocuments:
18+
count: 1
19+
- isKind:
20+
of: CephObjectStore
21+
- containsDocument:
22+
kind: CephObjectStore
23+
apiVersion: ceph.rook.io/v1
24+
name: ocs-storagecluster-cephobjectstore
25+
- equal:
26+
path: spec.dataPool.replicated.size
27+
value: 3
28+
- equal:
29+
path: spec.gateway.instances
30+
value: 2
31+
- equal:
32+
path: spec.gateway.resources.requests.cpu
33+
value: "1"
34+
- equal:
35+
path: spec.gateway.resources.requests.memory
36+
value: "4Gi"
37+
- equal:
38+
path: spec.gateway.resources.limits.cpu
39+
value: "2"
40+
- equal:
41+
path: spec.gateway.resources.limits.memory
42+
value: "6Gi"
43+
44+
- it: Should output custom failureDomain zones
45+
set:
46+
objectStorage:
47+
dataPool:
48+
failureDomain: rack
49+
metadataPool:
50+
failureDomain: host
51+
asserts:
52+
- equal:
53+
path: spec.dataPool.failureDomain
54+
value: rack
55+
- equal:
56+
path: spec.metadataPool.failureDomain
57+
value: host
58+
59+
- it: Should output custom resource request limits
60+
set:
61+
objectStorage:
62+
resources:
63+
requests:
64+
cpu: 10
65+
memory: 100Gi
66+
limits:
67+
cpu: 100
68+
memory: 200Gi
69+
asserts:
70+
- equal:
71+
path: spec.gateway.resources.requests.cpu
72+
value: "10"
73+
- equal:
74+
path: spec.gateway.resources.requests.memory
75+
value: "100Gi"
76+
- equal:
77+
path: spec.gateway.resources.limits.cpu
78+
value: "100"
79+
- equal:
80+
path: spec.gateway.resources.limits.memory
81+
value: "200Gi"

values.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,14 @@ objectStorage:
5050
enable: true
5151
dataPool:
5252
replicas: 3
53+
# -- Failuredomain for the dataPool
54+
failureDomain: zone
55+
metadataPool:
56+
# -- Failuredomain for the metadataPool
57+
failureDomain: zone
5358
gateway:
5459
instances: 2
60+
5561
resources:
5662
requests:
5763
cpu: "1"

0 commit comments

Comments
 (0)