From fd453a1aee89b5679f9a3d116c56eb98e8baf641 Mon Sep 17 00:00:00 2001 From: Michael Russell Date: Thu, 6 Jun 2019 17:56:51 +0200 Subject: [PATCH] Get the slack url from a secret too! --- elasticsearch/examples/config/Makefile | 3 ++- elasticsearch/examples/config/values.yaml | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/elasticsearch/examples/config/Makefile b/elasticsearch/examples/config/Makefile index 5e58a855c..613ec3c77 100644 --- a/elasticsearch/examples/config/Makefile +++ b/elasticsearch/examples/config/Makefile @@ -7,8 +7,9 @@ install: helm upgrade --wait --timeout=600 --install $(RELEASE) --values ./values.yaml ../../ ; \ secrets: - kubectl delete secret elastic-config-credentials elastic-config-secret || true + kubectl delete secret elastic-config-credentials elastic-config-secret elastic-config-slack || true kubectl create secret generic elastic-config-credentials --from-literal=password=changeme --from-literal=username=elastic + kubectl create secret generic elastic-config-slack --from-literal=slack_url='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd' kubectl create secret generic elastic-config-secret --from-file=./watcher_encryption_key test: secrets install goss diff --git a/elasticsearch/examples/config/values.yaml b/elasticsearch/examples/config/values.yaml index c7b9c8065..fee419d1d 100644 --- a/elasticsearch/examples/config/values.yaml +++ b/elasticsearch/examples/config/values.yaml @@ -14,6 +14,11 @@ extraEnvs: secretKeyRef: name: elastic-credentials key: username + - name: SLACK_URL + valueFrom: + secretKeyRef: + name: elastic-config-slack + key: slack_url esConfig: elasticsearch.yml: | @@ -28,6 +33,6 @@ keystore: enabled: true strings: bootstrap.password: '${ELASTIC_PASSWORD}' - xpack.notification.slack.account.monitoring.secure_url: "https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd" + xpack.notification.slack.account.monitoring.secure_url: '${SLACK_URL}' files: xpack.watcher.encryption_key: /usr/share/elasticsearch/config/secret/watcher_encryption_key