Skip to content

Commit 9bb349f

Browse files
authored
Merge pull request #95688 from theashiot/OBSDOCS-1804-clean
OBSDOCS-1804: Allow loki to use virtual-host-style as an explicit
2 parents 8821808 + 190253d commit 9bb349f

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

modules/logging-loki-storage-aws.adoc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
[id="logging-loki-storage-aws_{context}"]
77
= AWS storage
88

9+
You can create an object storage in {aws-first} to store logs.
10+
911
.Prerequisites
1012

1113
* You installed the {loki-op}.
@@ -19,18 +21,21 @@
1921
+
2022
[source,terminal,subs="+quotes"]
2123
----
22-
$ oc create secret generic logging-loki-aws \
24+
$ oc create secret generic logging-loki-aws \ #<1>
2325
--from-literal=bucketnames="<bucket_name>" \
2426
--from-literal=endpoint="<aws_bucket_endpoint>" \
2527
--from-literal=access_key_id="<aws_access_key_id>" \
2628
--from-literal=access_key_secret="<aws_access_key_secret>" \
2729
--from-literal=region="<aws_region_of_your_bucket>"
30+
--from-literal=forcepathstyle="true" # <2>
2831
----
32+
<1> `logging-loki-aws` is the name of the secret.
33+
<2> {aws-short} endpoints (those ending in `.amazonaws.com`) use a virtual-hosted style by default, which is equivalent to setting the `forcepathstyle` attribute to `false`. Conversely, non-AWS endpoints use a path style, equivalent to setting `forcepathstyle` attribute to `true`. If you need to use a virtual-hosted style with non-AWS S3 services, you must explicitly set `forcepathstyle` to `false`.
2934
3035
[id="AWS_storage_STS_{context}"]
3136
== AWS storage for STS enabled clusters
3237

33-
If your cluster has STS enabled, the Cloud Credential Operator (CCO) supports short-term authentication using AWS tokens.
38+
If your cluster has STS enabled, the Cloud Credential Operator (CCO) supports short-term authentication by using AWS tokens.
3439

3540
You can create the Loki object storage secret manually by running the following command:
3641
[source,terminal,subs="+quotes"]

modules/logging-loki-storage-minio.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
[id="logging-loki-storage-minio_{context}"]
77
= Minio storage
88

9+
You can create an object storage in Minio to store logs.
10+
911
.Prerequisites
1012

1113
* You installed the {loki-op}.
@@ -19,9 +21,12 @@
1921
+
2022
[source,terminal,subs="+quotes"]
2123
----
22-
$ oc create secret generic logging-loki-minio \
24+
$ oc create secret generic logging-loki-minio \ # <1>
2325
--from-literal=bucketnames="<bucket_name>" \
2426
--from-literal=endpoint="<minio_bucket_endpoint>" \
2527
--from-literal=access_key_id="<minio_access_key_id>" \
2628
--from-literal=access_key_secret="<minio_access_key_secret>"
29+
--from-literal=forcepathstyle="true" # <2>
2730
----
31+
<1> `logging-loki-minio` is the name of the secret.
32+
<2> AWS endpoints (those ending in `.amazonaws.com`) use a virtual-hosted style by default, which is equivalent to setting the `forcepathstyle` attribute to `false`. Conversely, non-AWS endpoints use a path style, equivalent to setting `forcepathstyle` attribute to `true`. If you need to use a virtual-hosted style with non-AWS S3 services, you must explicitly set `forcepathstyle` to `false`.

modules/logging-loki-storage-odf.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
[id="logging-loki-storage-odf_{context}"]
77
= {rh-storage} storage
88

9+
You can create an object storage in {rh-storage} storage to store logs.
10+
911
.Prerequisites
1012

1113
* You installed the {loki-op}.
@@ -50,9 +52,12 @@ SECRET_ACCESS_KEY=$(oc get -n openshift-logging secret loki-bucket-odf -o jsonpa
5052
+
5153
[source,terminal,subs="+quotes"]
5254
----
53-
$ oc create -n openshift-logging secret generic logging-loki-odf \
55+
$ oc create -n openshift-logging secret generic logging-loki-odf \ #<1>
5456
--from-literal=access_key_id="<access_key_id>" \
5557
--from-literal=access_key_secret="<secret_access_key>" \
5658
--from-literal=bucketnames="<bucket_name>" \
5759
--from-literal=endpoint="https://<bucket_host>:<bucket_port>"
60+
--from-literal=forcepathstyle="true" # <2>
5861
----
62+
<1> `logging-loki-odf` is the name of the secret.
63+
<2> AWS endpoints (those ending in `.amazonaws.com`) use a virtual-hosted style by default, which is equivalent to setting the `forcepathstyle` attribute to `false`. Conversely, non-AWS endpoints use a path style, equivalent to setting `forcepathstyle` attribute to `true`. If you need to use a virtual-hosted style with non-AWS S3 services, you must explicitly set `forcepathstyle` to `false`.

0 commit comments

Comments
 (0)