From 8c5decfe580afa86993d647408e3c243279c266d Mon Sep 17 00:00:00 2001 From: Ashwin Mehendale Date: Thu, 26 Jun 2025 14:44:45 +0530 Subject: [PATCH] OBSDOCS-1804: Allow loki to use virtual-host-style as an explicit configuration option --- modules/logging-loki-storage-aws.adoc | 5 ++++- modules/logging-loki-storage-minio.adoc | 5 ++++- modules/logging-loki-storage-odf.adoc | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/logging-loki-storage-aws.adoc b/modules/logging-loki-storage-aws.adoc index 1fde1c10fbee..035b5dc74611 100644 --- a/modules/logging-loki-storage-aws.adoc +++ b/modules/logging-loki-storage-aws.adoc @@ -19,13 +19,16 @@ + [source,terminal,subs="+quotes"] ---- -$ oc create secret generic logging-loki-aws \ +$ oc create secret generic logging-loki-aws \ # <1> --from-literal=bucketnames="" \ --from-literal=endpoint="" \ --from-literal=access_key_id="" \ --from-literal=access_key_secret="" \ --from-literal=region="" + --from-literal=force_path_style="true" # <2> ---- +<1> `logging-loki-aws` is the secret name. +<2> AWS endpoints (those ending in `.amazonaws.com`) use a virtual-hosted style by default, which is equivalent to setting the `force_path_style` attribute to `false`. Conversely, non-AWS endpoints use a path style, equivalent to setting `force_path_style` attribute to `true`. If you need to use a virtual-hosted style with non-AWS S3 compatible services, you must explicitly set `force_path_style` to `false`. [id="AWS_storage_STS_{context}"] == AWS storage for STS enabled clusters diff --git a/modules/logging-loki-storage-minio.adoc b/modules/logging-loki-storage-minio.adoc index c07c84606235..b15fb1544764 100644 --- a/modules/logging-loki-storage-minio.adoc +++ b/modules/logging-loki-storage-minio.adoc @@ -19,9 +19,12 @@ + [source,terminal,subs="+quotes"] ---- -$ oc create secret generic logging-loki-minio \ +$ oc create secret generic logging-loki-minio \ # <1> --from-literal=bucketnames="" \ --from-literal=endpoint="" \ --from-literal=access_key_id="" \ --from-literal=access_key_secret="" + --from-literal=force_path_style="true" # <2> ---- +<1> `logging-loki-minio` is the secret name. +<2> AWS endpoints (those ending in `.amazonaws.com`) use a virtual-hosted style by default, which is equivalent to setting the `force_path_style` attribute to `false`. Conversely, non-AWS endpoints use a path style, equivalent to setting `force_path_style` attribute to `true`. If you need to use a virtual-hosted style with non-AWS S3 compatible services, you must explicitly set `force_path_style` to `false`. diff --git a/modules/logging-loki-storage-odf.adoc b/modules/logging-loki-storage-odf.adoc index 40a5b938cec3..45c1b1be8128 100644 --- a/modules/logging-loki-storage-odf.adoc +++ b/modules/logging-loki-storage-odf.adoc @@ -50,9 +50,12 @@ SECRET_ACCESS_KEY=$(oc get -n openshift-logging secret loki-bucket-odf -o jsonpa + [source,terminal,subs="+quotes"] ---- -$ oc create -n openshift-logging secret generic logging-loki-odf \ +$ oc create -n openshift-logging secret generic logging-loki-odf \ #<1> --from-literal=access_key_id="" \ --from-literal=access_key_secret="" \ --from-literal=bucketnames="" \ --from-literal=endpoint="https://:" + --from-literal=force_path_style="true" # <2> ---- +<1> `logging-loki-odf` is the secret name. +<2> AWS endpoints (those ending in `.amazonaws.com`) use a virtual-hosted style by default, which is equivalent to setting the `force_path_style` attribute to `false`. Conversely, non-AWS endpoints use a path style, equivalent to setting `force_path_style` attribute to `true`. If you need to use a virtual-hosted style with non-AWS S3 compatible services, you must explicitly set `force_path_style` to `false`.