diff --git a/elasticsearch/README.md b/elasticsearch/README.md index f5e7727b5..d0aba0671 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -114,6 +114,7 @@ support multiple versions with minimal changes. | `antiAffinity` | Setting this to hard enforces the [anti-affinity][] rules. If it is set to soft it will be done "best effort". Other values will be ignored | `hard` | | `clusterHealthCheckParams` | The [Elasticsearch cluster health status params][] that will be used by readiness [probe][] command | `wait_for_status=green&timeout=1s` | | `clusterName` | This will be used as the Elasticsearch [cluster.name][] and should be unique per cluster in the namespace | `elasticsearch` | +| `clusterDeprecationIndexing` | Enable or disable deprecation logs to be indexed (should be disabled when deploying master only node groups) | `false` | | `enableServiceLinks` | Set to false to disabling service links, which can cause slow pod startup times when there are many services in the current namespace. | `true` | | `envFrom` | Templatable string to be passed to the [environment from variables][] which will be appended to the `envFrom:` definition for the container | `[]` | | `esConfig` | Allows you to add any config files in `/usr/share/elasticsearch/config/` such as `elasticsearch.yml` and `log4j2.properties`. See [values.yaml][] for an example of the formatting | `{}` | diff --git a/elasticsearch/templates/statefulset.yaml b/elasticsearch/templates/statefulset.yaml index 21741ce45..5daec98d5 100644 --- a/elasticsearch/templates/statefulset.yaml +++ b/elasticsearch/templates/statefulset.yaml @@ -315,6 +315,8 @@ spec: value: "{{ .Values.clusterName }}" - name: network.host value: "{{ .Values.networkHost }}" + - name: cluster.deprecation_indexing.enabled + value: "{{ .Values.clusterDeprecationIndexing }}" {{- if .Values.esJavaOpts }} - name: ES_JAVA_OPTS value: "{{ .Values.esJavaOpts }}" diff --git a/elasticsearch/tests/elasticsearch_test.py b/elasticsearch/tests/elasticsearch_test.py index d0c7319fc..c4043e48b 100755 --- a/elasticsearch/tests/elasticsearch_test.py +++ b/elasticsearch/tests/elasticsearch_test.py @@ -45,6 +45,7 @@ def test_defaults(): {"name": "discovery.seed_hosts", "value": uname + "-headless"}, {"name": "network.host", "value": "0.0.0.0"}, {"name": "cluster.name", "value": clusterName}, + {"name": "cluster.deprecation_indexing.enabled", "value": "false"}, {"name": "node.master", "value": "true"}, {"name": "node.data", "value": "true"}, {"name": "node.ingest", "value": "true"}, @@ -1512,3 +1513,13 @@ def test_disable_automount_sa_token(): ] == False ) + + +def test_enable_deprecation_indexing(): + config = """ +clusterDeprecationIndexing: "true" +""" + r = helm_template(config) + assert {"name": "cluster.deprecation_indexing.enabled", "value": "true"} in r[ + "statefulset" + ][uname]["spec"]["template"]["spec"]["containers"][0]["env"] diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index 49ebb34ff..64088be84 100755 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -20,6 +20,8 @@ minimumMasterNodes: 2 esMajorVersion: "" +clusterDeprecationIndexing: "false" + # Allows you to add any config files in /usr/share/elasticsearch/config/ # such as elasticsearch.yml and log4j2.properties esConfig: {}