2026-11-15: Prometheus did not scrape the new Gitea Actions exporter, its mounted config was stale¶
Kind: reference (incident report)
Severity: warning · Status: resolved (why the kubelet kept a stale Secret is open in #3255) · Resolved by: operator agent · Duration: 0:46 from detection to resolution, 18:43:54–19:29:54 UTC (fault from 18:28:24, 1 h 1 min) · Taskbase task: #3251
Summary¶
#628 (#1467) deployed gitea/gitea-actions-exporter with its ServiceMonitor and the GiteaActionsStalled rules. Prometheus loaded the new rules but never loaded the new scrape job, so absent(gitea_actions_scrape_success == 1) fired 15 minutes later. The exporter itself read Gitea fine. The kubelet on worker-2 kept serving the Prometheus pod a copy of its config Secret from 2026-11-07, which did not have the job. Deleting the pod made the StatefulSet recreate it with the current Secret, and the alert resolved.
Impact¶
- Services: Prometheus on hetzner-mgmt did not scrape
gitea-actions-exporterfrom 18:28:24 to 19:29:22. The CI-runner health that #1467 added had no data: the waiting-job rules ofGiteaActionsStalledand the Platform health view. The recovery restarted Prometheus: no scrapes from 19:27:05 to about 19:27:47, and thefortimer of the already firingNodeHighMemoryUsage(control-plane-1) restarted (pending again from 19:28:04). - Users: none noticed. No CI job waited unusually long: at 19:24 the exporter reported one
ubuntu-latestjob queued for 0 s and threeubuntu-latestrunners online. - Data: none lost. Prometheus's TSDB stayed on its Bound PVC
prometheus-monitoring-kube-prometheus-prometheus-db-prometheus-monitoring-kube-prometheus-prometheus-0. - Duration: 46 min from detection (18:43:54) to the alert's resolution (19:29:54). The fault began when the ServiceMonitor was created at 18:28:24.
Timeline¶
All times UTC, 2026-11-15.
| Time | Event | Source |
|---|---|---|
| 18:18:51 | #628 merged: exporter, Service, ServiceMonitor and PrometheusRule gitea/gitea-actions |
merge commit 5d537ee3 |
| 18:28:24 | Flux Kustomization gitea-actions-exporter creates the Deployment, ServiceMonitor monitoring/gitea-actions-exporter and PrometheusRule |
creationTimestamp of the objects |
| 18:28:34 | Prometheus pod's rule ConfigMap volume refreshed (..2026_11_15_18_28_34); its config Secret volume stays at ..2026_11_07_09_00_06 |
ls -la in the pod's config-reloader container |
| 18:28:36 | Prometheus reloads: new rules, old scrape jobs | /api/v1/status/runtimeinfo lastConfigTime |
| 18:43:54 | Detected: GiteaActionsStalled fires (absent(gitea_actions_scrape_success == 1), for: 15m) |
Alertmanager, alert 38bcd0becf95a959 |
| 18:44:54 | Taskbase incident #3251 raised | Taskbase |
| ~19:22 | operator agent: the alert still fires and is not silenced; the exporter answers gitea_actions_scrape_success 1; Prometheus has no target for it |
commands 1–4 below |
| 19:27:05 | operator agent deletes pod prometheus-monitoring-kube-prometheus-prometheus-0 |
command 9 |
| 19:27:47 | New Prometheus starts on worker-1, config loaded 19:27:57, pod Ready by 19:28:09 | runtimeinfo, kubectl wait |
| 19:29:22 | First scrape of serviceMonitor/monitoring/gitea-actions-exporter/0: up |
/api/v1/targets |
| 19:29:54 | Resolved: Alertmanager sends the resolved notification | Taskbase comment on #3251 |
| 19:31:45 | Alertmanager lists only Watchdog as active on hetzner-mgmt |
command 11 |
Root cause¶
prometheus-operator renders every ServiceMonitor into the Secret monitoring/prometheus-monitoring-kube-prometheus-prometheus (prometheus.yaml.gz). The Prometheus pod mounts that Secret as the volume config, and the config-reloader sidecar reloads Prometheus when the mounted file changes. The kubelet is what keeps the mounted copy current. On worker-2 (kubelet v1.36.5, configMapAndSecretChangeDetectionStrategy: Watch, syncFrequency: 1m) it did not:
- The API Secret held 47 jobs, including
serviceMonitor/monitoring/gitea-actions-exporter/0(sha256 of the gzip5ed26af9…). The mounted copy (4b322679…) and Prometheus's loaded config held the other 46. That one job was the only difference. - The mounted copy's directory was
..2026_11_07_09_00_06, while the same pod's rule ConfigMap volume refreshed at 18:28:34 for the PrometheusRule of the same change. - The kubelet kept remounting Secret volumes (
storage_operation_duration_seconds_count{operation_name="volume_mount",volume_plugin="kubernetes.io/secret"}at 84086), and Alertmanager's config Secret volume on the same node matched its API Secret. So only this one Secret was stale, served from the kubelet's watch cache.
So the configuration in Git and in the API was right. Prometheus ran the old one because its node never delivered the new one. Why the kubelet's cache of this Secret stopped updating is not known. The ops runner has no talosctl to read the kubelet's log, and it is left to the owner in #3255.
The alert did what it is meant to: its rule also fires when "Prometheus has not scraped it". The runbook covers only the case where the exporter cannot read Gitea. That gap is #3254.
What the agent did¶
Each command named the context admin@mgmt-cluster (ops runbook rule 8). Alertmanager and Prometheus were read through the API server's Service proxy (Read Alertmanager and Prometheus on a cluster). Read-only unless marked write.
kubectl get --raw "$AM/api/v2/alerts":GiteaActionsStalledactive onhetzner-mgmtsince 18:43:54, nosilencedBy.- The runbook's read-only checks:
get pods -l app=gitea-actions-exporter,logs deploy/gitea-actions-exporter --tail=20,get externalsecret gitea-actions-exporter-token. Pod Running for 54 min with 0 restarts and an empty log, ExternalSecretSecretSynced. - Exporter metrics through the Service proxy (
get --raw /api/v1/namespaces/gitea/services/http:gitea-actions-exporter:8080/proxy/metrics) instead of the runbook'sport-forwardtolocalhost:8080:gitea_actions_scrape_success 1, so the exporter reads Gitea. $PROM/api/v1/queryforgitea_actions_scrape_successandup{namespace="gitea"}, and$PROM/api/v1/targets: no result, no target.node_uname_infolisted hetzner-mgmt's four nodes.- ServiceMonitor, Service and EndpointSlice compared: the selector
app: gitea-actions-exporter, portmetricsand endpoint10.244.2.58:8080match. The Prometheus CR selects every ServiceMonitor in every namespace (serviceMonitorSelector: {},serviceMonitorNamespaceSelector: {}). - The job was in the operator's Secret (
get secret prometheus-monitoring-kube-prometheus-prometheus, gunzipped) but not in$PROM/api/v1/status/config, whose last reload was 18:28:36. - In the pod's
config-reloadercontainer,sha256sumandls -laof/etc/prometheus/config/: hash4b322679…against the API's5ed26af9…, and..datapointing at..2026_11_07_09_00_06. A diff of the job names: only the exporter's job missing. Alertmanager's mounted config on the same node matched its Secret. - Before the write:
flux get kustomizations -A --status-selector ready=falseandflux get helmreleases -A --status-selector ready=falsewere empty, and Helm releasemonitoring-kube-prometheus-stackwas at revision 168,deployed. worker-2 was at 53 % memory and Prometheus's RSS was 865Mi.NodeHighMemoryUsagewas for control-plane-1 (86 %). - write at 19:27:05:
kubectl --context admin@mgmt-cluster -n monitoring delete pod prometheus-monitoring-kube-prometheus-prometheus-0 --wait=true --timeout=300s. Why: make the StatefulSet recreate the pod, so the kubelet mounts the current Secret. No Git change can do that, because Git and the API already held the right configuration. Result: exit 0.kubectl wait --for=condition=Readymet, and the new pod was on worker-1 with the PVC still Bound. - After the write: the job is in the loaded config, the target is
up(first scrape 19:29:22),gitea_actions_scrape_successis 1, andabsent(gitea_actions_scrape_success == 1)is empty.count(up == 0)is empty with 82 targets. The mounted hash now equals the Secret's (5ed26af9…). kubectl get --raw "$AM/api/v2/alerts"at 19:31:45: onlyWatchdogactive;GiteaActionsStalledgone. The Flux and Helm checks of step 8 are unchanged.- Follow-ups #3254 and #3255 created, and this report.
No Flux object was suspended, reconciled or annotated, and no silence was set.
Resolution and verification¶
At 19:31–19:33 Prometheus scraped serviceMonitor/monitoring/gitea-actions-exporter/0 with health up, and min_over_time(gitea_actions_scrape_success[5m]) was 1. Alertmanager sent the resolved notification at 19:29:54 and no longer listed the alert at 19:31:45. No Kustomization or HelmRelease was not Ready.
Follow-ups¶
-
3254: the
GiteaActionsStalledrunbook gets the "Prometheus does not scrape the exporter" case with these checks and the pod recreation, and itsport-forwardcheck is replaced by the Service proxy (technical-writer).¶ -
3255: the owner reads worker-2's kubelet log with
talosctlfor why its cache of the Secret was stale, and spot-checks other Secret volumes on worker-2.¶
References¶
- Alert:
GiteaActionsStalled(absent(gitea_actions_scrape_success == 1),for: 15m,components/gitea/actions-exporter/prometheus-rule.yaml); runbook - Taskbase incident task: #3251
- Runs: the
operatoragent run of #3251 - Pull requests: #628 (deployed the exporter); this report's pull request
- Runbook sections: GiteaActionsStalled → Read-only checks, ops runbook → Rules of engagement, Read Alertmanager and Prometheus on a cluster
Open questions¶
- Why the kubelet on worker-2 kept a stale copy of this one Secret while refreshing the pod's ConfigMap volumes and Alertmanager's Secret (#3255).
- Whether the Secret changed between 2026-11-07 09:00 and 2026-11-15 18:28. If it did, the mount was stale longer than this incident shows. The record does not say. The Secret has no
managedFields, and its other 46 jobs match what Prometheus had loaded. - No alert detects a Prometheus that runs a config other than the operator's Secret. This one was caught only because the new rule depended on the new job.