Skip to content

Commit 561ddf4

Browse files
authored
Merge pull request #260 from kskewes/ibm-example
Add IBM multi-az example and extend storage options in README
2 parents 25a1f47 + 7528583 commit 561ddf4

File tree

2 files changed

+95
-0
lines changed

2 files changed

+95
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ Following parameters are available to customize the elastic cluster:
4949
- storage-class-provisioner: Defines which type of provisioner to use (e.g. `kubernetes.io/aws-ebs`)
5050
- Using an existing Storage Class (e.g. storage class for GlusterFS)
5151
- storage-class: Name of an existing StorageClass object to use (zones can be [])
52+
- Using a custom Storage Class per zone
53+
- Useful if additional `parameters` are required by provisioner over and above `type` and `storage-class-provisioner`.
54+
- Manually create a Storage Class per zone.
55+
- Storage Class names must match zone names in `zones`. You are free to choose any naming scheme providing they match. Master and Data pod names will include the zone name.
56+
- Per the `Using a provisioner` section, specify `type:` and `provisioner:` values that match your custom Storage Classes.
5257
- Omitting the storage section, results in a VolumeClaimTemplates without storage-class annotation (uses default StorageClass in this case. See [change default StorageClass](https://kubernetes.io/docs/tasks/administer-cluster/change-default-storage-class/))
5358
- volume-reclaim-policy: Define what PV's should use (`Retain` or `Delete`)
5459
- instrumentation

example/example-es-cluster-ibm.yaml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Storage classes must be created first with all IBM's required `parameters`
2+
# See: https://github.com/upmc-enterprises/elasticsearch-operator/issues/259
3+
---
4+
# ibmcloud-block-storage-plugin/templates/ibmc-block-retain-gold-StorageClass.yaml
5+
apiVersion: storage.k8s.io/v1
6+
kind: StorageClass
7+
metadata:
8+
name: dal10
9+
provisioner: ibm.io/ibmc-block
10+
parameters:
11+
zone: "dal10"
12+
region: "us-south"
13+
type: "Endurance"
14+
iopsPerGB: "10"
15+
sizeRange: "[20-4000]Gi"
16+
fsType: "ext4"
17+
billingType: "hourly"
18+
classVersion: "2"
19+
reclaimPolicy: "Retain"
20+
---
21+
# ibmcloud-block-storage-plugin/templates/ibmc-block-retain-gold-StorageClass.yaml
22+
apiVersion: storage.k8s.io/v1
23+
kind: StorageClass
24+
metadata:
25+
name: dal12
26+
provisioner: ibm.io/ibmc-block
27+
parameters:
28+
zone: "dal12"
29+
region: "us-south"
30+
type: "Endurance"
31+
iopsPerGB: "10"
32+
sizeRange: "[20-4000]Gi"
33+
fsType: "ext4"
34+
billingType: "hourly"
35+
classVersion: "2"
36+
reclaimPolicy: "Retain"
37+
---
38+
# ibmcloud-block-storage-plugin/templates/ibmc-block-retain-gold-StorageClass.yaml
39+
apiVersion: storage.k8s.io/v1
40+
kind: StorageClass
41+
metadata:
42+
name: dal13
43+
provisioner: ibm.io/ibmc-block
44+
parameters:
45+
zone: "dal13"
46+
region: "us-south"
47+
type: "Endurance"
48+
iopsPerGB: "10"
49+
sizeRange: "[20-4000]Gi"
50+
fsType: "ext4"
51+
billingType: "hourly"
52+
classVersion: "2"
53+
reclaimPolicy: "Retain"
54+
---
55+
apiVersion: enterprises.upmc.com/v1
56+
kind: ElasticsearchCluster
57+
metadata:
58+
name: example-es-cluster
59+
spec:
60+
kibana:
61+
image: docker.elastic.co/kibana/kibana-oss:6.1.3
62+
cerebro:
63+
image: upmcenterprises/cerebro:0.6.8
64+
elastic-search-image: upmcenterprises/docker-elasticsearch-kubernetes:6.1.3_0
65+
client-node-replicas: 3
66+
master-node-replicas: 2
67+
data-node-replicas: 3
68+
network-host: 0.0.0.0
69+
zones: # [] # Single zone cluster
70+
- dal10
71+
- dal12
72+
- dal13
73+
data-volume-size: 10Gi
74+
java-options: "-Xms512m -Xmx512m"
75+
snapshot: # Not verified with IBM Cloud Object Storage
76+
scheduler-enabled: false
77+
bucket-name: elasticsnapshots99
78+
cron-schedule: "@every 2m"
79+
image: upmcenterprises/elasticsearch-cron:0.0.4
80+
storage:
81+
# storage-class: ibmc-block-retain-gold # Single zone cluster
82+
type: Endurance # Multi zone cluster
83+
storage-class-provisioner: ibm.io/ibmc-block # Multi zone cluster
84+
resources:
85+
requests:
86+
memory: 512Mi
87+
cpu: 500m
88+
limits:
89+
memory: 1024Mi
90+
cpu: '1'

0 commit comments

Comments
 (0)