From 51aac6f5f4b29dd2bb6fbd0a92e9bef63294ee92 Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Wed, 6 Jan 2021 10:54:36 +0100 Subject: [PATCH 1/3] [elasticsearch] fix secrets in config example This commit fix the secret name for credentials in config example Fix 1008 --- elasticsearch/examples/config/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elasticsearch/examples/config/values.yaml b/elasticsearch/examples/config/values.yaml index ebde4f4d9..fe2166176 100644 --- a/elasticsearch/examples/config/values.yaml +++ b/elasticsearch/examples/config/values.yaml @@ -7,12 +7,12 @@ extraEnvs: - name: ELASTIC_PASSWORD valueFrom: secretKeyRef: - name: elastic-credentials + name: elastic-config-credentials key: password - name: ELASTIC_USERNAME valueFrom: secretKeyRef: - name: elastic-credentials + name: elastic-config-credentials key: username # This is just a dummy file to make sure that From 1bdbbeac444d39541f9d12a7621dc1818dad1677 Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Wed, 6 Jan 2021 13:21:01 +0100 Subject: [PATCH 2/3] enable security --- elasticsearch/examples/config/values.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/elasticsearch/examples/config/values.yaml b/elasticsearch/examples/config/values.yaml index fe2166176..d417ce84b 100644 --- a/elasticsearch/examples/config/values.yaml +++ b/elasticsearch/examples/config/values.yaml @@ -20,6 +20,7 @@ extraEnvs: # as a custom elasticsearch.yml esConfig: elasticsearch.yml: | + xpack.security.enabled: true path.data: /usr/share/elasticsearch/data keystore: From 8467ee6b21e0c14878d97d3a207f5a328d63aede Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Wed, 6 Jan 2021 18:32:48 +0100 Subject: [PATCH 3/3] update tests with credentials --- elasticsearch/examples/config/test/goss.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/elasticsearch/examples/config/test/goss.yaml b/elasticsearch/examples/config/test/goss.yaml index 51c4907f5..455da3603 100644 --- a/elasticsearch/examples/config/test/goss.yaml +++ b/elasticsearch/examples/config/test/goss.yaml @@ -2,6 +2,8 @@ http: http://localhost:9200/_cluster/health: status: 200 timeout: 2000 + username: "{{ .Env.ELASTIC_USERNAME }}" + password: "{{ .Env.ELASTIC_PASSWORD }}" body: - "green" - '"number_of_nodes":1' @@ -10,6 +12,8 @@ http: http://localhost:9200: status: 200 timeout: 2000 + username: "{{ .Env.ELASTIC_USERNAME }}" + password: "{{ .Env.ELASTIC_PASSWORD }}" body: - '"cluster_name" : "config"' - "You Know, for Search"