This repository has been archived by the owner on May 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[elasticsearch] Keystore integration #154
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
default: test | ||
include ../../../helpers/examples.mk | ||
|
||
RELEASE := helm-es-config | ||
|
||
install: | ||
helm upgrade --wait --timeout=600 --install $(RELEASE) --values ./values.yaml ../../ ; \ | ||
|
||
secrets: | ||
kubectl delete secret elastic-config-credentials elastic-config-secret elastic-config-slack elastic-config-custom-path || 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=xpack.notification.slack.account.monitoring.secure_url='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd' | ||
kubectl create secret generic elastic-config-secret --from-file=xpack.watcher.encryption_key=./watcher_encryption_key | ||
kubectl create secret generic elastic-config-custom-path --from-literal=slack_url='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd' --from-literal=thing_i_don_tcare_about=test | ||
|
||
test: secrets install goss | ||
|
||
purge: | ||
helm del --purge $(RELEASE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Config | ||
|
||
An example testing suite for testing some of the optional features of this chart. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
http: | ||
http://localhost:9200/_cluster/health: | ||
status: 200 | ||
timeout: 2000 | ||
body: | ||
- 'green' | ||
- '"number_of_nodes":1' | ||
- '"number_of_data_nodes":1' | ||
|
||
http://localhost:9200: | ||
status: 200 | ||
timeout: 2000 | ||
body: | ||
- '"cluster_name" : "config"' | ||
- '"name" : "config-master-0"' | ||
- 'You Know, for Search' | ||
|
||
command: | ||
"elasticsearch-keystore list": | ||
exit-status: 0 | ||
stdout: | ||
- keystore.seed | ||
- bootstrap.password | ||
- xpack.notification.slack.account.monitoring.secure_url | ||
- xpack.notification.slack.account.otheraccount.secure_url | ||
- xpack.watcher.encryption_key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
|
||
clusterName: "config" | ||
replicas: 1 | ||
|
||
extraEnvs: | ||
- name: ELASTIC_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: elastic-credentials | ||
key: password | ||
- name: ELASTIC_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: elastic-credentials | ||
key: username | ||
|
||
# This is just a dummy file to make sure that | ||
# the keystore can be mounted at the same time | ||
# as a custom elasticsearch.yml | ||
esConfig: | ||
elasticsearch.yml: | | ||
path.data: /usr/share/elasticsearch/data | ||
|
||
keystore: | ||
- secretName: elastic-config-secret | ||
- secretName: elastic-config-slack | ||
- secretName: elastic-config-custom-path | ||
items: | ||
- key: slack_url | ||
path: xpack.notification.slack.account.otheraccount.secure_url |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
supersecret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -210,3 +210,5 @@ lifecycle: {} | |
|
||
sysctlInitContainer: | ||
enabled: true | ||
|
||
keystore: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ CHART: | |
- metricbeat | ||
ES_SUITE: | ||
- default | ||
- config | ||
- multi | ||
- oss | ||
- security | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curious, why not have this
{{- range ...}}
inside the{{ if ...
block above? I I don't think there'd be any behavior changes, just curious about the style choice.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a leftover from the original refactoring. But you are right that it doesn't change anything. I fixed it up to make it as explicit as possible.