You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: production/helm/loki/docs/examples/enterprise/README.md
+18-14Lines changed: 18 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,14 +18,15 @@ Open [overrides-enterprise-gcs.yaml](./overrides-enterprise-gcs.yaml) and replac
18
18
19
19
### Create Admin Token Secret (Required for Provisioner)
20
20
21
-
If you are using the enterprise provisioner to automatically create tenant tokens, you must first create an admin token secret:
21
+
If you are using the enterprise provisioner to automatically create tenants, you must first create an admin token secret:
22
22
23
23
1. Generate an admin token using the Loki CLI:
24
24
```bash
25
-
docker run grafana/loki:latest -target=tokengen -tokengen.token-file=/tmp/token
25
+
docker run grafana/enterprise-logs:latest -target=tokengen -tokengen.token-file=/tmp/token
26
26
# Copy the generated token from the container
27
27
docker cp <container-id>:/tmp/token ./admin-token
28
28
```
29
+
> Alternatively see [batchjob.yaml](batchjob.yaml) for an example that uses a configmap in k8s to retreive the bucket configuration. Note that this requires GEL to be already in place with a `helm install` command beforehand to access the data
29
30
30
31
2. Create the admin token secret:
31
32
```bash
@@ -45,26 +46,29 @@ If you are using the enterprise provisioner to automatically create tenant token
### Create tenants automatically via the provisioner
49
50
50
-
If you enabled the provisioner, retrieve the generated tenant tokens from the provisioner logs:
51
+
If you enabled the provisioner, additional tenants will be automatically created based on your configuration. For example, the below will create a tenant named `loki-a`:
namespace: loki # The namespace of the GEL installation
6
+
spec:
7
+
backoffLimit: 0
8
+
template:
9
+
metadata:
10
+
labels:
11
+
app: tokengen
12
+
spec:
13
+
serviceAccountName: loki-enterprise-logs # The service account of the GEL installation which has necessary IAM permissions to the storage bucket (e.g. GCS, S3, etc.)
14
+
restartPolicy: Never
15
+
containers:
16
+
- name: tokengen
17
+
image: grafana/enterprise-logs:latest
18
+
args:
19
+
- -target=tokengen
20
+
- -config.file=/etc/loki/config/config.yaml
21
+
- -tokengen.token-file=/tmp/token
22
+
volumeMounts:
23
+
- name: config-volume
24
+
mountPath: /etc/loki/config
25
+
readOnly: true
26
+
volumes:
27
+
- name: config-volume
28
+
configMap:
29
+
name: enterprise-logs # The configmap of the GEL installation which contains the configuration of the storage bucket
0 commit comments