Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Get the slack url from a secret too!
Browse files Browse the repository at this point in the history
  • Loading branch information
Crazybus committed Jul 22, 2019
1 parent 8236a57 commit fd453a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion elasticsearch/examples/config/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion elasticsearch/examples/config/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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

0 comments on commit fd453a1

Please sign in to comment.