From 0f4d4e89caee3570c0cabc21fbb942081e92587d Mon Sep 17 00:00:00 2001 From: Robert Jacob Date: Thu, 3 Nov 2022 19:06:02 +0100 Subject: [PATCH] Add region to LokiStack example secret and simplify creation --- modules/cluster-logging-loki-deploy.adoc | 27 +++++++++++------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/modules/cluster-logging-loki-deploy.adoc b/modules/cluster-logging-loki-deploy.adoc index c8d9c9a4e5..013857d55f 100644 --- a/modules/cluster-logging-loki-deploy.adoc +++ b/modules/cluster-logging-loki-deploy.adoc @@ -44,7 +44,7 @@ You must select this option to ensure that cluster monitoring scrapes the `opens .. Ensure that *LokiOperator* is listed with *Status* as *Succeeded* in all the projects. + -. Create a `Secret` YAML file that uses the `access_key_id` and `access_key_secret` fields to specify your base64-encoded AWS credentials. For example: +. Create a `Secret` YAML file that uses the `access_key_id` and `access_key_secret` fields to specify your AWS credentials and `bucketnames`, `endpoint` and `region` to define the object storage location. For example: + [source,yaml] ---- @@ -53,16 +53,13 @@ kind: Secret metadata: name: logging-loki-s3 namespace: openshift-logging -data: - access_key_id: QUtJQUlPU0ZPRE5ON0VYQU1QTEUK <1> - access_key_secret: d0phbHJYVXRuRkVNSS9LN01ERU5HL2JQeFJmaUNZRVhBTVBMRUtFWQo= <2> - bucketnames: czMtYnVja2V0LW5hbWU= <3> - endpoint: aHR0cHM6Ly9zMy5ldS1jZW50cmFsLTEuYW1hem9uYXdzLmNvbQ== <4> +stringData: + access_key_id: AKIAIOSFODNN7EXAMPLE + access_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + bucketnames: s3-bucket-name + endpoint: https://s3.eu-central-1.amazonaws.com + region: eu-central-1 ---- -<1> Base64-encoded access key id -<2> Base64-encoded access key secret -<3> Base64-encoded bucket name -<4> Base64-encoded S3 API endpoint + . Create the `LokiStack` custom resource: + @@ -106,11 +103,11 @@ oc apply -f logging-loki.yaml spec: managementState: Managed logStore: - type: lokistack - lokistack: - name: logging-loki - collection: - type: "vector" + type: lokistack + lokistack: + name: logging-loki + collection: + type: "vector" ---- + .. Apply the configuration: