From d4d53b610e04a7f8097a4fcc53e25ffb8a9ba32e Mon Sep 17 00:00:00 2001 From: Daniel Schneider Date: Thu, 20 Aug 2020 11:15:23 +0200 Subject: [PATCH] docs: fix RGW AWS credential export commands Fix ceph rgw export commands to access values in object yaml definitions through jsonpath instead of grep. This solves issues that arise, should there be more than one lines with the grep value in the yaml file which would concatenate arbitrary values. Closes: https://github.com/rook/rook/issues/6087 Signed-off-by: Daniel Schneider --- Documentation/ceph-object.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/ceph-object.md b/Documentation/ceph-object.md index e1f475b25..491c608f1 100644 --- a/Documentation/ceph-object.md +++ b/Documentation/ceph-object.md @@ -174,9 +174,9 @@ The following commands extract key pieces of information from the secret and con ```bash #config-map, secret, OBC will part of default if no specific name space mentioned -export AWS_HOST=$(kubectl -n default get cm ceph-bucket -o yaml | grep BUCKET_HOST | awk '{print $2}') -export AWS_ACCESS_KEY_ID=$(kubectl -n default get secret ceph-bucket -o yaml | grep AWS_ACCESS_KEY_ID | awk '{print $2}' | base64 --decode) -export AWS_SECRET_ACCESS_KEY=$(kubectl -n default get secret ceph-bucket -o yaml | grep AWS_SECRET_ACCESS_KEY | awk '{print $2}' | base64 --decode) +export AWS_HOST=$(kubectl -n default get cm ceph-bucket -o jsonpath='{.data.BUCKET_HOST}') +export AWS_ACCESS_KEY_ID=$(kubectl -n default get secret ceph-bucket -o jsonpath='{.data.AWS_ACCESS_KEY_ID}' | base64 --decode) +export AWS_SECRET_ACCESS_KEY=$(kubectl -n default get secret ceph-bucket -o jsonpath='{.data.AWS_SECRET_ACCESS_KEY}' | base64 --decode) ``` ## Consume the Object Storage