From 385f8d34875e2f134948cad4aa1b13520ebe7c5a Mon Sep 17 00:00:00 2001 From: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> Date: Wed, 16 Sep 2020 18:25:50 +0200 Subject: [PATCH] [elasticsearch] fix secrets names in examples (#811) Kubernetes doesn't accept `_` characters in resources names. This commit fix the secrets names in the examples we provide by replacing `_` by `-`which Kubernetes is accepting. Source: https://github.com/helm/helm/issues/6477 --- elasticsearch/README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/elasticsearch/README.md b/elasticsearch/README.md index 1fde6db5e..3280efdde 100644 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -290,16 +290,16 @@ Create the secret, the key name needs to be the keystore key path. In this example we will create a secret from a file and from a literal string. ``` -kubectl create secret generic encryption_key --from-file=xpack.watcher.encryption_key=./watcher_encryption_key -kubectl create secret generic slack_hook --from-literal=xpack.notification.slack.account.monitoring.secure_url='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd' +kubectl create secret generic encryption-key --from-file=xpack.watcher.encryption_key=./watcher_encryption_key +kubectl create secret generic slack-hook --from-literal=xpack.notification.slack.account.monitoring.secure_url='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd' ``` To add these secrets to the keystore: ``` keystore: - - secretName: encryption_key - - secretName: slack_hook + - secretName: encryption-key + - secretName: slack-hook ``` #### Multiple keys @@ -308,12 +308,12 @@ All keys in the secret will be added to the keystore. To create the previous example in one secret you could also do: ``` -kubectl create secret generic keystore_secrets --from-file=xpack.watcher.encryption_key=./watcher_encryption_key --from-literal=xpack.notification.slack.account.monitoring.secure_url='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd' +kubectl create secret generic keystore-secrets --from-file=xpack.watcher.encryption_key=./watcher_encryption_key --from-literal=xpack.notification.slack.account.monitoring.secure_url='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd' ``` ``` keystore: - - secretName: keystore_secrets + - secretName: keystore-secrets ``` #### Custom paths and keys @@ -326,7 +326,7 @@ example we will only add the `slack_hook` key from a secret that also has other keys. Our secret looks like this: ``` -kubectl create secret generic slack_secrets --from-literal=slack_channel='#general' --from-literal=slack_hook='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd' +kubectl create secret generic slack-secrets --from-literal=slack_channel='#general' --from-literal=slack_hook='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd' ``` We only want to add the `slack_hook` key to the keystore at path @@ -334,7 +334,7 @@ We only want to add the `slack_hook` key to the keystore at path ``` keystore: - - secretName: slack_secrets + - secretName: slack-secrets items: - key: slack_hook path: xpack.notification.slack.account.monitoring.secure_url