diff --git a/README.md b/README.md index be70e3d8a..a45697ed7 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,11 @@ Following parameters are available to customize the elastic cluster: - storage-class-provisioner: Defines which type of provisioner to use (e.g. `kubernetes.io/aws-ebs`) - Using an existing Storage Class (e.g. storage class for GlusterFS) - storage-class: Name of an existing StorageClass object to use (zones can be []) + - Using a custom Storage Class per zone + - Useful if additional `parameters` are required by provisioner over and above `type` and `storage-class-provisioner`. + - Manually create a Storage Class per zone. + - 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. + - Per the `Using a provisioner` section, specify `type:` and `provisioner:` values that match your custom Storage Classes. - 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/)) - volume-reclaim-policy: Define what PV's should use (`Retain` or `Delete`) - instrumentation diff --git a/example/example-es-cluster-ibm.yaml b/example/example-es-cluster-ibm.yaml new file mode 100644 index 000000000..1a1a2a1dc --- /dev/null +++ b/example/example-es-cluster-ibm.yaml @@ -0,0 +1,90 @@ +# Storage classes must be created first with all IBM's required `parameters` +# See: https://github.com/upmc-enterprises/elasticsearch-operator/issues/259 +--- +# ibmcloud-block-storage-plugin/templates/ibmc-block-retain-gold-StorageClass.yaml +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: dal10 +provisioner: ibm.io/ibmc-block +parameters: + zone: "dal10" + region: "us-south" + type: "Endurance" + iopsPerGB: "10" + sizeRange: "[20-4000]Gi" + fsType: "ext4" + billingType: "hourly" + classVersion: "2" +reclaimPolicy: "Retain" +--- +# ibmcloud-block-storage-plugin/templates/ibmc-block-retain-gold-StorageClass.yaml +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: dal12 +provisioner: ibm.io/ibmc-block +parameters: + zone: "dal12" + region: "us-south" + type: "Endurance" + iopsPerGB: "10" + sizeRange: "[20-4000]Gi" + fsType: "ext4" + billingType: "hourly" + classVersion: "2" +reclaimPolicy: "Retain" +--- +# ibmcloud-block-storage-plugin/templates/ibmc-block-retain-gold-StorageClass.yaml +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: dal13 +provisioner: ibm.io/ibmc-block +parameters: + zone: "dal13" + region: "us-south" + type: "Endurance" + iopsPerGB: "10" + sizeRange: "[20-4000]Gi" + fsType: "ext4" + billingType: "hourly" + classVersion: "2" +reclaimPolicy: "Retain" +--- +apiVersion: enterprises.upmc.com/v1 +kind: ElasticsearchCluster +metadata: + name: example-es-cluster +spec: + kibana: + image: docker.elastic.co/kibana/kibana-oss:6.1.3 + cerebro: + image: upmcenterprises/cerebro:0.6.8 + elastic-search-image: upmcenterprises/docker-elasticsearch-kubernetes:6.1.3_0 + client-node-replicas: 3 + master-node-replicas: 2 + data-node-replicas: 3 + network-host: 0.0.0.0 + zones: # [] # Single zone cluster + - dal10 + - dal12 + - dal13 + data-volume-size: 10Gi + java-options: "-Xms512m -Xmx512m" + snapshot: # Not verified with IBM Cloud Object Storage + scheduler-enabled: false + bucket-name: elasticsnapshots99 + cron-schedule: "@every 2m" + image: upmcenterprises/elasticsearch-cron:0.0.4 + storage: + # storage-class: ibmc-block-retain-gold # Single zone cluster + type: Endurance # Multi zone cluster + storage-class-provisioner: ibm.io/ibmc-block # Multi zone cluster + resources: + requests: + memory: 512Mi + cpu: 500m + limits: + memory: 1024Mi + cpu: '1'