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: control-plane/roles/gardener-logging/README.md
+31-1Lines changed: 31 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,12 @@
1
1
# gardener-logging
2
2
3
-
This role deploys a promtail into a Gardener shooted seed. It is expected that the [logging role](../logging/) was deployed into the metal-stack control plane before executing this role.
3
+
Deploys Alloy (replacing Promtail) into Gardener shooted seeds and optionally into the garden cluster itself. Alloy collects pod logs via the Kubernetes API and forwards them to the Loki instance in the metal-stack control plane.
4
+
5
+
Expects the [logging role](../logging/) to have been deployed first.
6
+
7
+
## Configuration
8
+
9
+
The Alloy River config is generated from structured variables at deploy time. Override individual variables to customize behavior, or bypass the template entirely with `gardener_logging_alloy_config_raw`.
4
10
5
11
## Variables
6
12
@@ -20,3 +26,27 @@ The following variables can be set to configure the role:
20
26
| gardener_logging_ingress_loki_basic_auth_user || The basic auth user for the external loki ingress |
21
27
| gardener_logging_deploy_to_garden_cluster || Deploys promtail also into the garden cluster |
22
28
| gardener_logging_shooted_seeds || Shooted seed names on which to deploy promtails that log to loki |
29
+
30
+
### Alloy
31
+
32
+
| Name | Mandatory | Description |
33
+
| --- | --- | --- |
34
+
| gardener_logging_alloy_chart_version | yes | Helm chart version for alloy (release vector) |
| gardener_logging_alloy_port || Alloy listen port (default: `12345`) |
37
+
| gardener_logging_alloy_loki_write_endpoints || List of Loki push endpoints. Each entry: `{url, basic_auth?: {username, password}}` (default: HTTPS to `gardener_logging_ingress_dns`) |
38
+
| gardener_logging_alloy_cluster_label || Value for the `cluster=` external label on all log streams (default: `gardener_logging_shooted_seed.name`) |
39
+
| gardener_logging_alloy_meta_monitoring_enabled || Create a `ServiceMonitor` for alloy metrics and forward alloy's own logs to Loki. Requires kube-prometheus-stack in the seed cluster first (default: `false`) |
40
+
| gardener_logging_alloy_config_raw || Full Alloy River config string override. When set, bypasses all structured vars above. |
41
+
42
+
## Migration from Promtail
43
+
44
+
Alloy replaces Promtail as the log collector. Promtail releases are still deployed in parallel during the transition period (`# TODO remove promtail` markers in the task files).
Copy file name to clipboardExpand all lines: control-plane/roles/logging/README.md
+46-6Lines changed: 46 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,16 @@
1
1
# logging
2
2
3
-
This role is designed to set up logging using Ansible.
4
-
The role includes tasks to install and configure the following logging tools:
3
+
Deploys the control-plane logging stack into the Kubernetes control-plane cluster.
5
4
6
-
- Loki
7
-
- Logging ingress for Loki
8
-
- Promtail for monitoring the control plane cluster
5
+
Components:
6
+
7
+
-**Loki** — log storage and query backend
8
+
-**Alloy** — log collector (DaemonSet), replaces Promtail. Collects pod logs via the Kubernetes API (`loki.source.kubernetes`) and forwards them to Loki.
9
+
- Loki ingress with optional TLS and basic auth
10
+
11
+
## Configuration
12
+
13
+
The Alloy River config is generated from structured variables at deploy time. Override individual variables to customize behavior, or bypass the template entirely with `logging_alloy_config_raw`.
9
14
10
15
## Variables
11
16
@@ -29,4 +34,39 @@ The following variables can be set to configure the role:
29
34
| logging_ingress_loki_basic_auth_password_salt || The basic auth password salt used for stable password hashes |
30
35
| logging_ingress_loki_basic_auth_password || The basic auth password for the external loki ingress |
31
36
| logging_ingress_loki_basic_auth_user || The basic auth user for the external loki ingress |
32
-
| logging_alloy_config || The config to use for alloy |
37
+
38
+
### Alloy
39
+
40
+
| Name | Mandatory | Description |
41
+
| --- | --- | --- |
42
+
| logging_alloy_chart_version | yes | Helm chart version for alloy (release vector) |
| logging_alloy_port || Alloy listen port (default: `12345`) |
45
+
| logging_alloy_loki_write_endpoints || List of Loki push endpoints. Each entry: `{url, basic_auth?: {username, password}}` (default: `http://loki:3100/loki/api/v1/push`) |
46
+
| logging_alloy_cluster_label || Value for the `cluster=` external label on all log streams (default: `{{ metal_control_plane_stage_name }}`) |
47
+
| logging_alloy_eventrouter_enabled || Include the eventrouter `stage.match` pipeline (default: `true`) |
48
+
| logging_alloy_meta_monitoring_enabled || Forward alloy's own logs to Loki and create a `ServiceMonitor` for metrics. Requires kube-prometheus-stack to be deployed first (default: `false`) |
49
+
| logging_alloy_config_raw || Full Alloy River config string override. When set, bypasses all structured vars above. |
50
+
51
+
## Meta-monitoring
52
+
53
+
When `logging_alloy_meta_monitoring_enabled: true`:
54
+
55
+
- Alloy's own internal logs are forwarded to Loki with `job=alloy`
56
+
- The alloy chart creates a `ServiceMonitor` — kube-prometheus-stack picks it up automatically (no label selector required since `serviceMonitorSelectorNilUsesHelmValues: false`)
57
+
58
+
Deploy the monitoring role first, then set this to `true` and reapply.
59
+
60
+
## Migration from Promtail
61
+
62
+
Alloy replaces Promtail as the log collector. The `promtail` Helm release is still deployed in parallel during the transition period.
0 commit comments