From a6f4f557f35a04e8852e450b2ecf005605222a5e Mon Sep 17 00:00:00 2001 From: Alexey Artamonov Date: Thu, 5 Nov 2026 21:10:29 +0300 Subject: [PATCH] fix(seaweedfs): let the dashboard read the lifecycle monitors The dashboard reads an application's WorkloadMonitors by name through its resource-map Role, so the admin and worker monitors the lifecycle switch adds were invisible to the tenant: the components ran, but the application page never listed them. Assisted-by: LLM Signed-off-by: Alexey Artamonov --- .../templates/dashboard-resourcemap.yaml | 4 +++ .../extra/seaweedfs/tests/lifecycle_test.yaml | 34 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/packages/extra/seaweedfs/templates/dashboard-resourcemap.yaml b/packages/extra/seaweedfs/templates/dashboard-resourcemap.yaml index dfd408dad..eb038fe8f 100644 --- a/packages/extra/seaweedfs/templates/dashboard-resourcemap.yaml +++ b/packages/extra/seaweedfs/templates/dashboard-resourcemap.yaml @@ -27,6 +27,10 @@ rules: - {{ $.Release.Name }}-filer - {{ $.Release.Name }}-db - {{ $.Release.Name }}-s3 + {{- if .Values.lifecycle.enabled }} + - {{ $.Release.Name }}-admin + - {{ $.Release.Name }}-worker + {{- end }} {{- if eq .Values.topology "Simple" }} - {{ $.Release.Name }}-volume {{- range $poolName, $pool := .Values.volume.pools }} diff --git a/packages/extra/seaweedfs/tests/lifecycle_test.yaml b/packages/extra/seaweedfs/tests/lifecycle_test.yaml index 07aeb573e..e8d3c0842 100644 --- a/packages/extra/seaweedfs/tests/lifecycle_test.yaml +++ b/packages/extra/seaweedfs/tests/lifecycle_test.yaml @@ -7,6 +7,7 @@ suite: seaweedfs lifecycle switch reaches the data plane templates: - templates/seaweedfs.yaml - templates/admin-credentials.yaml + - templates/dashboard-resourcemap.yaml release: name: seaweedfs @@ -216,3 +217,36 @@ tests: - equal: path: spec.upgrade.remediation.retries value: -1 + + # The dashboard reads each WorkloadMonitor by name through this Role, so a + # monitor missing from it never shows up for the tenant. + - it: lets the dashboard read the admin and worker monitors + template: templates/dashboard-resourcemap.yaml + set: *platform + documentSelector: + path: kind + value: Role + asserts: + - contains: + path: rules[2].resourceNames + content: seaweedfs-admin + - contains: + path: rules[2].resourceNames + content: seaweedfs-worker + + - it: grants no lifecycle monitors when lifecycle is off + template: templates/dashboard-resourcemap.yaml + set: + <<: *platform + lifecycle: + enabled: false + documentSelector: + path: kind + value: Role + asserts: + - notContains: + path: rules[2].resourceNames + content: seaweedfs-admin + - notContains: + path: rules[2].resourceNames + content: seaweedfs-worker