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 <aleksei.artamonov@aenix.io>
This commit is contained in:
Alexey Artamonov committed 2026-11-05 21:10:29 +03:00
1 parent c3d1a73d8c
commit a6f4f557f3
2 files changed
+38

No files matched your search

@@ -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 }}
@@ -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