Skip to content

Commit 2e5e264

Browse files
committed
Update for 2.14+, and talk about basic-auth Secrets for 2.17 & 2-edge.
Signed-off-by: Flynn <[email protected]>
1 parent 25b087a commit 2e5e264

File tree

6 files changed

+212
-88
lines changed

6 files changed

+212
-88
lines changed

linkerd.io/content/2-edge/tasks/external-prometheus.md

Lines changed: 61 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -157,37 +157,80 @@ kubectl -n linkerd-viz get configmap prometheus-config -o yaml
157157
Linkerd's viz extension components like `metrics-api`, etc depend
158158
on the Prometheus instance to power the dashboard and CLI.
159159

160-
The `prometheusUrl` field gives you a single place through
161-
which all these components can be configured to an external Prometheus URL.
162-
This is allowed both through the CLI and Helm.
160+
The `prometheusUrl` field gives you a single place through which all these
161+
components can be configured to an external Prometheus URL. This is allowed
162+
both through Helm and the CLI. Additionally, if the external Prometheus is
163+
secured with basic auth, you can retrieve those credentials from a Secret or
164+
include them credentials in the URL.
163165

164-
### CLI
166+
### Helm
167+
168+
To configure an external Prometheus instance through Helm, you'll set
169+
`prometheusUrl` in your `values.yaml` file:
170+
171+
```yaml
172+
prometheusUrl: http://existing-prometheus.namespace:9090
173+
```
174+
175+
If the external Prometheus is secured with basic auth, you can either store
176+
the credentials in a Secret or you can put them directly into the URL.
165177
166-
This can be done by passing a file with the above field to the `values` flag,
167-
which is available through `linkerd viz install` command.
178+
We recommend using a Secret -- first, create the Secret, which must be in the
179+
same namespace as Linkerd Viz itself:
168180
169181
```yaml
170-
prometheusUrl: existing-prometheus.xyz:9090
182+
kubectl create secret generic \
183+
prometheus-credentials -n linkerd-viz \
184+
--from-literal=user=your-username
185+
--from-literal=password=your-password
171186
```
172187

173-
Once applied, this configuration is not persistent across installs.
174-
The same has to be passed again by the user during re-installs, upgrades, etc.
188+
Then reference the Secret in your `values.yaml`:
189+
190+
```yaml
191+
prometheusUrl: http://existing-prometheus.namespace:9090
192+
prometheusCredsSecret: prometheus-credentials
193+
```
194+
195+
If you can't use a Secret, you can include the credentials directly in the URL
196+
instead:
197+
198+
```yaml
199+
prometheusUrl: http://username:[email protected]:9090
200+
```
175201
176-
When using an external Prometheus and configuring the `prometheusUrl`
177-
field, Linkerd's Prometheus will still be included in installation.
178-
If you wish to disable it, be sure to include the
179-
following configuration as well:
202+
Finally, when using an external Prometheus and configuring the `prometheusUrl`
203+
field, Linkerd's Prometheus will still be included in installation unless you
204+
disable it:
180205

181206
```yaml
182207
prometheus:
183208
enabled: false
184209
```
185210

186-
### Helm
187-
188-
The same configuration can be applied through `values.yaml` when using Helm.
189-
Once applied, Helm makes sure that the configuration is
190-
persistent across upgrades.
211+
This configuration is **not** persistent across installs: you'll need to
212+
pass the same `values.yaml` for re-installs, upgrades, etc.
191213

192214
More information on installation through Helm can be found
193215
[here](../install-helm/)
216+
217+
### CLI
218+
219+
When installing using the CLI, you can use the `--values` switch to use the
220+
same `values.yaml` that you would with Helm, or you can set the
221+
`prometheusUrl` directly, for example:
222+
223+
```bash
224+
linkerd viz install \
225+
--set prometheus.enabled=false \
226+
--set prometheusUrl=http://existing-prometheus.namespace:9090
227+
```
228+
229+
You can also set the `prometheusCredsSecret` directly:
230+
231+
```bash
232+
linkerd viz install \
233+
--set prometheus.enabled=false \
234+
--set prometheusUrl=http://existing-prometheus.namespace:9090 \
235+
--set prometheusCredsSecret=prometheus-credentials
236+
```

linkerd.io/content/2.13/tasks/external-prometheus.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,13 @@ on the Prometheus instance to power the dashboard and CLI.
140140

141141
The `prometheusUrl` field gives you a single place through
142142
which all these components can be configured to an external Prometheus URL.
143-
This is allowed both through the CLI and Helm.
144-
If the external Prometheus is secured with basic auth,
145-
you can include the credentials in the URL as well.
143+
This is allowed both through Helm and the CLI. If the external Prometheus is
144+
secured with basic auth, you can include the credentials in the URL as well.
146145

147-
### CLI
146+
### Helm
148147

149-
This can be done by passing a file with the above field to the `values` flag,
150-
which is available through `linkerd viz install` command.
148+
To configure an external Prometheus instance through Helm, you'll set
149+
`prometheusUrl` in your `values.yaml` file:
151150

152151
```yaml
153152
prometheusUrl: http://existing-prometheus.namespace:9090
@@ -160,9 +159,6 @@ credentials in the URL as well.
160159
prometheusUrl: http://username:[email protected]:9090
161160
```
162161
163-
Once applied, this configuration is not persistent across installs.
164-
The same has to be passed again by the user during re-installs, upgrades, etc.
165-
166162
When using an external Prometheus and configuring the `prometheusUrl`
167163
field, Linkerd's Prometheus will still be included in installation.
168164
If you wish to disable it, be sure to include the
@@ -173,11 +169,20 @@ prometheus:
173169
enabled: false
174170
```
175171

176-
### Helm
177-
178-
The same configuration can be applied through `values.yaml` when using Helm.
179-
Once applied, Helm makes sure that the configuration is
180-
persistent across upgrades.
172+
This configuration is **not** persistent across installs: you'll need to
173+
pass the same `values.yaml` for re-installs, upgrades, etc.
181174

182175
More information on installation through Helm can be found
183176
[here](../install-helm/)
177+
178+
### CLI
179+
180+
When installing using the CLI, you can use the `--values` switch to use the
181+
same `values.yaml` that you would with Helm, or you can set the
182+
`prometheusUrl` directly, for example:
183+
184+
```bash
185+
linkerd viz install \
186+
--set prometheus.enabled=false \
187+
--set prometheusUrl=http://existing-prometheus.namespace:9090
188+
```

linkerd.io/content/2.14/tasks/external-prometheus.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,13 @@ on the Prometheus instance to power the dashboard and CLI.
140140

141141
The `prometheusUrl` field gives you a single place through
142142
which all these components can be configured to an external Prometheus URL.
143-
This is allowed both through the CLI and Helm.
144-
If the external Prometheus is secured with basic auth,
145-
you can include the credentials in the URL as well.
143+
This is allowed both through Helm and the CLI. If the external Prometheus is
144+
secured with basic auth, you can include the credentials in the URL as well.
146145

147-
### CLI
146+
### Helm
148147

149-
This can be done by passing a file with the above field to the `values` flag,
150-
which is available through `linkerd viz install` command.
148+
To configure an external Prometheus instance through Helm, you'll set
149+
`prometheusUrl` in your `values.yaml` file:
151150

152151
```yaml
153152
prometheusUrl: http://existing-prometheus.namespace:9090
@@ -160,9 +159,6 @@ credentials in the URL as well.
160159
prometheusUrl: http://username:[email protected]:9090
161160
```
162161
163-
Once applied, this configuration is not persistent across installs.
164-
The same has to be passed again by the user during re-installs, upgrades, etc.
165-
166162
When using an external Prometheus and configuring the `prometheusUrl`
167163
field, Linkerd's Prometheus will still be included in installation.
168164
If you wish to disable it, be sure to include the
@@ -173,11 +169,20 @@ prometheus:
173169
enabled: false
174170
```
175171

176-
### Helm
177-
178-
The same configuration can be applied through `values.yaml` when using Helm.
179-
Once applied, Helm makes sure that the configuration is
180-
persistent across upgrades.
172+
This configuration is **not** persistent across installs: you'll need to
173+
pass the same `values.yaml` for re-installs, upgrades, etc.
181174

182175
More information on installation through Helm can be found
183176
[here](../install-helm/)
177+
178+
### CLI
179+
180+
When installing using the CLI, you can use the `--values` switch to use the
181+
same `values.yaml` that you would with Helm, or you can set the
182+
`prometheusUrl` directly, for example:
183+
184+
```bash
185+
linkerd viz install \
186+
--set prometheus.enabled=false \
187+
--set prometheusUrl=http://existing-prometheus.namespace:9090
188+
```

linkerd.io/content/2.15/tasks/external-prometheus.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,24 @@ on the Prometheus instance to power the dashboard and CLI.
140140

141141
The `prometheusUrl` field gives you a single place through
142142
which all these components can be configured to an external Prometheus URL.
143-
This is allowed both through the CLI and Helm.
143+
This is allowed both through Helm and the CLI. If the external Prometheus is
144+
secured with basic auth, you can include the credentials in the URL as well.
144145

145-
### CLI
146+
### Helm
146147

147-
This can be done by passing a file with the above field to the `values` flag,
148-
which is available through `linkerd viz install` command.
148+
To configure an external Prometheus instance through Helm, you'll set
149+
`prometheusUrl` in your `values.yaml` file:
149150

150151
```yaml
151-
prometheusUrl: existing-prometheus.xyz:9090
152+
prometheusUrl: http://existing-prometheus.namespace:9090
152153
```
153154
154-
Once applied, this configuration is not persistent across installs.
155-
The same has to be passed again by the user during re-installs, upgrades, etc.
155+
If the external Prometheus is secured with basic auth, you can include the
156+
credentials in the URL as well.
157+
158+
```yaml
159+
prometheusUrl: http://username:[email protected]:9090
160+
```
156161
157162
When using an external Prometheus and configuring the `prometheusUrl`
158163
field, Linkerd's Prometheus will still be included in installation.
@@ -164,11 +169,20 @@ prometheus:
164169
enabled: false
165170
```
166171

167-
### Helm
168-
169-
The same configuration can be applied through `values.yaml` when using Helm.
170-
Once applied, Helm makes sure that the configuration is
171-
persistent across upgrades.
172+
This configuration is **not** persistent across installs: you'll need to
173+
pass the same `values.yaml` for re-installs, upgrades, etc.
172174

173175
More information on installation through Helm can be found
174176
[here](../install-helm/)
177+
178+
### CLI
179+
180+
When installing using the CLI, you can use the `--values` switch to use the
181+
same `values.yaml` that you would with Helm, or you can set the
182+
`prometheusUrl` directly, for example:
183+
184+
```bash
185+
linkerd viz install \
186+
--set prometheus.enabled=false \
187+
--set prometheusUrl=http://existing-prometheus.namespace:9090
188+
```

linkerd.io/content/2.16/tasks/external-prometheus.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,24 @@ on the Prometheus instance to power the dashboard and CLI.
140140

141141
The `prometheusUrl` field gives you a single place through
142142
which all these components can be configured to an external Prometheus URL.
143-
This is allowed both through the CLI and Helm.
143+
This is allowed both through Helm and the CLI. If the external Prometheus is
144+
secured with basic auth, you can include the credentials in the URL as well.
144145

145-
### CLI
146+
### Helm
146147

147-
This can be done by passing a file with the above field to the `values` flag,
148-
which is available through `linkerd viz install` command.
148+
To configure an external Prometheus instance through Helm, you'll set
149+
`prometheusUrl` in your `values.yaml` file:
149150

150151
```yaml
151-
prometheusUrl: existing-prometheus.xyz:9090
152+
prometheusUrl: http://existing-prometheus.namespace:9090
152153
```
153154
154-
Once applied, this configuration is not persistent across installs.
155-
The same has to be passed again by the user during re-installs, upgrades, etc.
155+
If the external Prometheus is secured with basic auth, you can include the
156+
credentials in the URL as well.
157+
158+
```yaml
159+
prometheusUrl: http://username:[email protected]:9090
160+
```
156161
157162
When using an external Prometheus and configuring the `prometheusUrl`
158163
field, Linkerd's Prometheus will still be included in installation.
@@ -164,11 +169,20 @@ prometheus:
164169
enabled: false
165170
```
166171

167-
### Helm
168-
169-
The same configuration can be applied through `values.yaml` when using Helm.
170-
Once applied, Helm makes sure that the configuration is
171-
persistent across upgrades.
172+
This configuration is **not** persistent across installs: you'll need to
173+
pass the same `values.yaml` for re-installs, upgrades, etc.
172174

173175
More information on installation through Helm can be found
174176
[here](../install-helm/)
177+
178+
### CLI
179+
180+
When installing using the CLI, you can use the `--values` switch to use the
181+
same `values.yaml` that you would with Helm, or you can set the
182+
`prometheusUrl` directly, for example:
183+
184+
```bash
185+
linkerd viz install \
186+
--set prometheus.enabled=false \
187+
--set prometheusUrl=http://existing-prometheus.namespace:9090
188+
```

0 commit comments

Comments
 (0)