From 93692bc95677a7bee3f1ebbf271da1e18a5ed7fd Mon Sep 17 00:00:00 2001 From: Alejandro Moreno <47833905+alemorcuq@users.noreply.github.com> Date: Tue, 21 May 2019 19:28:08 +0200 Subject: [PATCH] [stable/magento] Disable Elasticsearch by default (#14042) Signed-off-by: Alejandro Moreno --- stable/magento/Chart.yaml | 2 +- stable/magento/README.md | 13 +++++++++++-- stable/magento/values.yaml | 18 +++++++++++++++++- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/stable/magento/Chart.yaml b/stable/magento/Chart.yaml index 32e9903058..132c9e5617 100644 --- a/stable/magento/Chart.yaml +++ b/stable/magento/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: magento -version: 5.0.0 +version: 5.0.1 appVersion: 2.3.1 description: A feature-rich flexible e-commerce solution. It includes transaction options, multi-store functionality, loyalty programs, product categorization and shopper filtering, promotion rules, and more. keywords: diff --git a/stable/magento/README.md b/stable/magento/README.md index 0043eaa5ab..9cb69f27e8 100644 --- a/stable/magento/README.md +++ b/stable/magento/README.md @@ -90,7 +90,11 @@ The following table lists the configurable parameters of the Magento chart and t | `mariadb.db.name` | Database name to create | `bitnami_magento` | | `mariadb.db.user` | Database user to create | `bn_magento` | | `mariadb.db.password` | Password for the database | _random 10 character long alphanumeric string_ | -| `elasticsearch.enabled` | Whether to use the Elasticsearch chart as search engine for magento | `true` | +| `elasticsearch.enabled` | Use the Elasticsearch chart as search engine | `false` | +| `elasticsearch.cluster.env` | Cluster environment variables | `{MINIMUM_MASTER_NODES: "2"}` | +| `elasticsearch.client.replicas` | Client node replicas (deployment) | `1` | +| `elasticsearch.master.replicas` | Master node replicas (deployment) | `2` | +| `elasticsearch.data.replicas` | Data node replicas (statefulset) | `1` | | `service.type` | Kubernetes Service type | `LoadBalancer` | | `service.port` | Service HTTP port | `80` | | `service.httpsPort` | Service HTTPS port | `443` | @@ -131,6 +135,11 @@ The following table lists the configurable parameters of the Magento chart and t The above parameters map to the env variables defined in [bitnami/magento](http://github.com/bitnami/bitnami-docker-magento). For more information please refer to the [bitnami/magento](http://github.com/bitnami/bitnami-docker-magento) image documentation. +> **Note:**\ +> +> Setting `elasticsearch.enabled` to true will launch four more nodes by default. Use it with caution. + + > **Note**: > > For Magento to function correctly, you should specify the `magentoHost` parameter to specify the FQDN (recommended) or the public IP address of the Magento service. @@ -173,7 +182,7 @@ The [Bitnami Magento](https://github.com/bitnami/bitnami-docker-magento) image s ### To 5.0.0 -Manual intervention is needed in order to configure Elasticsearch 6 as Magento search engine after upgrading to 5.0.0. +Manual intervention is needed if configuring Elasticsearch 6 as Magento search engine is desired. [Follow the Magento documentation](https://devdocs.magento.com/guides/v2.3/config-guide/elasticsearch/configure-magento.html) in order to configure Elasticsearch, setting **Search Engine** to **Elasticsearch 6.0+**. If using the Elasticsearch server included in this chart, `hostname` and `port` can be obtained with the following commands: diff --git a/stable/magento/values.yaml b/stable/magento/values.yaml index 8f8159325b..2e5b129e41 100644 --- a/stable/magento/values.yaml +++ b/stable/magento/values.yaml @@ -163,7 +163,23 @@ mariadb: elasticsearch: ## Whether to deploy a elasticsearch server to use as magento's search engine ## To use an external server set this to false and configure the externalElasticsearch parameters - enabled: true + enabled: false + + cluster: + env: + # IMPORTANT: https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#minimum_master_nodes + # To prevent data loss, it is vital to configure the discovery.zen.minimum_master_nodes setting so that each master-eligible + # node knows the minimum number of master-eligible nodes that must be visible in order to form a cluster. + MINIMUM_MASTER_NODES: "2" + + client: + replicas: 1 + + master: + replicas: 2 + + data: + replicas: 1 ## Kubernetes configuration ## For minikube, set this to NodePort, elsewhere use LoadBalancer