Skip to content

Commit b0c387e

Browse files
authored
docs: Update variable formatting (#19610) (#19627)
1 parent 135cb65 commit b0c387e

File tree

6 files changed

+106
-27
lines changed

6 files changed

+106
-27
lines changed

docs/sources/alert/_index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,16 +304,16 @@ The [Cortex rules action](https://github.com/grafana/cortex-rules-action) introd
304304
uses: grafana/cortex-rules-action@master
305305
env:
306306
ACTION: check
307-
RULES_DIR: <source_dir_of_rules> # Example: logs/recording_rules/,logs/alerts/
307+
RULES_DIR: <SOURCE_DIR_OF_RULES> # Example: logs/recording_rules/,logs/alerts/
308308
BACKEND: loki
309309
310310
- name: Deploy rules to Loki staging
311311
uses: grafana/cortex-rules-action@master
312312
env:
313-
CORTEX_ADDRESS: <loki_ingress_addr>
313+
CORTEX_ADDRESS: <LOKI_INGRESS_ADDR>
314314
CORTEX_TENANT_ID: fake
315315
ACTION: sync
316-
RULES_DIR: <source_dir_of_rules> # Example: logs/recording_rules/,logs/alerts/
316+
RULES_DIR: <SOURCE_DIR_OF_RULES> # Example: logs/recording_rules/,logs/alerts/
317317
BACKEND: loki
318318
```
319319

@@ -327,7 +327,7 @@ A full sharding-enabled Ruler example is:
327327

328328
```yaml
329329
ruler:
330-
alertmanager_url: <alertmanager_endpoint>
330+
alertmanager_url: <ALERTMANAGER_ENDPOINT>
331331
enable_alertmanager_v2: true # true by default since Loki 3.2.0
332332
enable_api: true
333333
enable_sharding: true
@@ -339,7 +339,7 @@ ruler:
339339
rule_path: /tmp/rules
340340
storage:
341341
gcs:
342-
bucket_name: <loki-rules-bucket>
342+
bucket_name: <LOKI_RULES_BUCKET>
343343
```
344344

345345
## Ruler storage

docs/sources/community/maintaining/release/patch-vulnerabilities.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Before start patching vulnerabilities, know what are you patching. It can be one
4343
1. Check if [dependabot already patched the dependency](https://github.com/grafana/loki/pulls?q=is%3Apr+label%3Adependencies+is%3Aclosed) or [have a PR opened to patch](https://github.com/grafana/loki/pulls?q=is%3Apr+is%3Aopen+label%3Adependencies) . If not, manually upgrade the package on the `main` branch as follows.
4444

4545
```shell
46-
go get -u -v <package-path>@<patched-version>
46+
go get -u -v <PACKAGE_PATH>@<PATCHED_VERSION>
4747
go mod tidy
4848
go mod vendor
4949
```

docs/sources/reference/loki-http-api.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ For information on how to configure Loki, refer to the [OTel Collector topic](ht
275275

276276
<!-- vale Google.Will = NO -->
277277
{{< admonition type="note" >}}
278-
When configuring the OpenTelemetry Collector, you must use `endpoint: http://<loki-addr>/otlp`, as the collector automatically completes the endpoint. Entering the full endpoint will generate an error.
278+
When configuring the OpenTelemetry Collector, you must use `endpoint: http://<LOKI_ADDR>/otlp`, as the collector automatically completes the endpoint. Entering the full endpoint will generate an error.
279279
{{< /admonition >}}
280280
<!-- vale Google.Will = YES -->
281281

@@ -451,7 +451,7 @@ To query against your hosted log tenant in Grafana Cloud, use the **User** and *
451451

452452
```bash
453453
curl -u "User:$API_TOKEN" \
454-
-G -s "<URL-PROVIDED-IN-LOKI-DATA-SOURCE-SETTINGS>/loki/api/v1/query" \
454+
-G -s "<URL_PROVIDED_IN_LOKI_DATA_SOURCE_SETTINGS>/loki/api/v1/query" \
455455
--data-urlencode 'query=sum(rate({job="varlogs"}[10m])) by (level)' | jq
456456
```
457457

@@ -1440,16 +1440,16 @@ Example cURL command:
14401440

14411441
```bash
14421442
curl -X GET \
1443-
<compactor_addr>/loki/api/v1/delete \
1444-
-H 'X-Scope-OrgID: <orgid>'
1443+
<COMPACTOR_ADDR>/loki/api/v1/delete \
1444+
-H 'X-Scope-OrgID: <ORG_ID>'
14451445
```
14461446

14471447
The same example deletion request for Grafana Enterprise Logs uses Basic Authentication and specifies the tenant name as a user; `Tenant1` is the tenant name in this example. The password in this example is an access policy token that has been defined in the API_TOKEN environment variable. The token must be for an access policy with `logs:delete` scope for the tenant specified in the user field.
14481448

14491449
```bash
14501450
curl -u "Tenant1:$API_TOKEN" \
14511451
-X GET \
1452-
<compactor_addr>/loki/api/v1/delete
1452+
<COMPACTOR_ADDR>/loki/api/v1/delete
14531453
```
14541454

14551455
### Request cancellation of a delete request
@@ -1487,16 +1487,16 @@ Example cURL command:
14871487

14881488
```bash
14891489
curl -X DELETE \
1490-
'<compactor_addr>/loki/api/v1/delete?request_id=<request_id>' \
1491-
-H 'X-Scope-OrgID: <tenant-id>'
1490+
'<COMPACTOR_ADDR>/loki/api/v1/delete?request_id=<REQUEST_ID>' \
1491+
-H 'X-Scope-OrgID: <TENANT_ID>'
14921492
```
14931493

14941494
The same example deletion cancellation request for Grafana Enterprise Logs uses Basic Authentication and specifies the tenant name as a user; `Tenant1` is the tenant name in this example. The password in this example is an access policy token that has been defined in the API_TOKEN environment variable. The token must be for an access policy with `logs:delete` scope for the tenant specified in the user field.
14951495

14961496
```bash
14971497
curl -u "Tenant1:$API_TOKEN" \
14981498
-X DELETE \
1499-
'<compactor_addr>/loki/api/v1/delete?request_id=<request_id>'
1499+
'<COMPACTOR_ADDR>/loki/api/v1/delete?request_id=<REQUEST_ID>'
15001500
```
15011501

15021502
## Format a LogQL query

docs/sources/setup/install/helm/deployment-guides/aws.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ apiVersion: eksctl.io/v1alpha5
6161
kind: ClusterConfig
6262

6363
metadata:
64-
name: <INSERT-CLUSTER-NAME>
65-
region: <INSERT-REGION-FOR-CLUSTER>
64+
name: <INSERT_CLUSTER_NAME>
65+
region: <INSERT_REGION_FOR_CLUSTER>
6666
version: "1.31"
6767

6868
iam:

docs/sources/setup/install/helm/install-scalable/_index.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,15 @@ loki:
148148
# s3 URL can be used to specify the endpoint, access key, secret key, and bucket name this works well for S3 compatible storages or if you are hosting Loki on-premises and want to use S3 as the storage backend. Either use the s3 URL or the individual fields below (AWS endpoint, region, secret).
149149
s3: s3://access_key:secret_access_key@custom_endpoint/bucket_name
150150
# AWS endpoint URL
151-
endpoint: <your-endpoint>
151+
endpoint: <YOUR_ENDPOINT>
152152
# AWS region where the S3 bucket is located
153-
region: <your-region>
153+
region: <YOUR_REGION>
154154
# AWS secret access key
155-
secretAccessKey: <your-secret-access-key>
155+
secretAccessKey: <YOUR_SECRET_ACCESS_KEY>
156156
# AWS access key ID
157-
accessKeyId: <your-access-key-id>
157+
accessKeyId: <YOUR_ACCESS_KEY_ID>
158158
# AWS signature version (e.g., v2 or v4)
159-
signatureVersion: <your-signature-version>
159+
signatureVersion: <YOUR_SIGNATURE_VERSION>
160160
# Forces the path style for S3 (true/false)
161161
s3ForcePathStyle: false
162162
# Allows insecure (HTTP) connections (true/false)
@@ -205,21 +205,21 @@ loki:
205205
type: azure
206206
azure:
207207
# Name of the Azure Blob Storage account
208-
accountName: <your-account-name>
208+
accountName: <YOUR_ACCOUNT_NAME>
209209
# Key associated with the Azure Blob Storage account
210-
accountKey: <your-account-key>
210+
accountKey: <YOUR_ACCOUNT_KEY>
211211
# Comprehensive connection string for Azure Blob Storage account (Can be used to replace endpoint, accountName, and accountKey)
212-
connectionString: <your-connection-string>
212+
connectionString: <YOUR_CONNECTION_STRING>
213213
# Flag indicating whether to use Azure Managed Identity for authentication
214214
useManagedIdentity: false
215215
# Flag indicating whether to use a federated token for authentication
216216
useFederatedToken: false
217217
# Client ID of the user-assigned managed identity (if applicable)
218-
userAssignedId: <your-user-assigned-id>
218+
userAssignedId: <YOUR_USER_ASSIGNED_ID>
219219
# Timeout duration for requests made to the Azure Blob Storage account (in seconds)
220-
requestTimeout: <your-request-timeout>
220+
requestTimeout: <YOUR_REQUEST_TIMEOUT>
221221
# Domain suffix of the Azure Blob Storage service endpoint (e.g., core.windows.net)
222-
endpointSuffix: <your-endpoint-suffix>
222+
endpointSuffix: <YOUR_ENDPOINT_SUFFIX>
223223
bucketNames:
224224
chunks: "chunks"
225225
ruler: "ruler"

docs/sources/setup/upgrade/upgrade-to-6x/index.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,85 @@ resultsCache:
8484

8585
With these caches disabled, Loki will return to defaults which enables an in-memory results and chunks cache, so you will still get some caching.
8686

87+
#### BREAKING: Zone-aware ingester StatefulSet serviceName fix (6.34.0+)
88+
89+
**Affected users**: Only deployments using zone-aware ingester replication (`ingester.zoneAwareReplication.enabled: true`)
90+
91+
In Helm chart version 6.34.0, [PR #18558](https://github.com/grafana/loki/pull/18558) fixed the `serviceName` field in zone-aware ingester StatefulSets to correctly reference headless services. However, since `serviceName` is an immutable field in Kubernetes StatefulSets, upgrading to 6.34.0 requires manual intervention.
92+
93+
**Required action before upgrading to 6.34.0**:
94+
95+
1. **Check if you're affected**:
96+
97+
```bash
98+
helm get values <RELEASE_NAME> | grep -A5 zoneAwareReplication
99+
```
100+
101+
If `enabled: true` appears, you need to follow these steps.
102+
103+
2. **Delete the StatefulSets** (data will be preserved):
104+
105+
```bash
106+
kubectl delete statefulset \
107+
<RELEASE_NAME>-ingester-zone-a \
108+
<RELEASE_NAME>-ingester-zone-b \
109+
<RELEASE_NAME>-ingester-zone-c \
110+
--cascade=orphan
111+
```
112+
113+
3. **Proceed with the Helm upgrade**:
114+
115+
```bash
116+
helm upgrade <RELEASE_NAME> grafana/loki --version 6.34.0
117+
```
118+
119+
**What happens**:
120+
121+
- PersistentVolumeClaims and data are preserved
122+
- New StatefulSets will be created with correct service references
123+
- Pods will restart and reattach to existing storage
124+
125+
**Why this change was necessary**:
126+
The previous configuration caused ingester scaling operations to fail because the rollout-operator couldn't find the correct headless services for the `/ingester/prepare-downscale` endpoint.
127+
128+
#### BREAKING: Make access modes for persistence on all PVCs and StatefulSets editable (6.38.0+)
129+
130+
Version 6.38.0 of the Helm charts introduced the ability to edit the access modes for persistence on all PVCs and StatefulSets. This is a breaking change because it requires users to manually orphan StatefulSets before upgrading.
131+
132+
**Required action before upgrading to 6.38.0**:
133+
134+
1. **Delete the StatefulSets** (delete only the ones that exist in your deployment):
135+
136+
```bash
137+
# Core components (SimpleScalable mode)
138+
kubectl delete statefulset <RELEASE_NAME>-write --cascade=orphan
139+
kubectl delete statefulset <RELEASE_NAME>-backend --cascade=orphan
140+
141+
# Single binary mode
142+
kubectl delete statefulset <RELEASE_NAME> --cascade=orphan
143+
144+
# Distributed mode components
145+
kubectl delete statefulset <RELEASE_NAME>-ingester --cascade=orphan
146+
147+
# Zone-aware ingester (if zoneAwareReplication.enabled is true)
148+
kubectl delete statefulset <RELEASE_NAME>-ingester-zone-a --cascade=orphan
149+
kubectl delete statefulset <RELEASE_NAME>-ingester-zone-b --cascade=orphan
150+
kubectl delete statefulset <RELEASE_NAME>-ingester-zone-c --cascade=orphan
151+
152+
kubectl delete statefulset <RELEASE_NAME>-index-gateway --cascade=orphan
153+
kubectl delete statefulset <RELEASE_NAME>-compactor --cascade=orphan
154+
kubectl delete statefulset <RELEASE_NAME>-ruler --cascade=orphan
155+
kubectl delete statefulset <RELEASE_NAME>-pattern-ingester --cascade=orphan
156+
kubectl delete statefulset <RELEASE_NAME>-bloom-planner --cascade=orphan
157+
kubectl delete statefulset <RELEASE_NAME>-bloom-gateway --cascade=orphan
158+
```
159+
160+
2. **Proceed with the Helm upgrade**:
161+
162+
```bash
163+
helm upgrade <RELEASE_NAME> grafana/loki --version 6.38.0
164+
```
165+
87166
#### Distributed mode
88167

89168
This chart introduces the ability to run Loki in distributed, or [microservices mode](https://grafana.com/docs/loki/<LOKI_VERSION>/get-started/deployment-modes/#microservices-mode). Separate instructions on how to enable this as well as how to migrate from the existing community chart will be coming shortly.

0 commit comments

Comments
 (0)