Files
Виталий ЧефановandClaude Opus 5.5 ce6dad9a58 v0.9.0: vulnerabilities on the map; event counts scaled to the window
Vulnerabilities: VulnerabilityReports from operator-trivy are cached
(trimmed to the fields shown) and mapped to cards through the scanned
object in their labels. A card shows a red shield with its CRITICAL CVE
count; the details list CRITICAL and HIGH CVEs with packages, installed
and fixed versions and the advisory link, one row per CVE and image.
Counted per CVE, not per package: openssh's six subpackages had made one
CVE count six times. Kept apart from problems on purpose: on the live
cluster 22 cards have some, which would bury the "is it working" badges.

Fixes, both found on the live cluster, where they made all five current
"problems":
- a Warning event's count is cumulative since its first occurrence; four
  dex-authenticators on xeon had 38-51 probe failures over two days (one
  an hour, pods never left Ready) and were badged as a burst. The count
  is now scaled to the part of the event's lifetime the window covers.
- upmeter's smoke-mini services and pods are its synthetic test, moved
  between nodes on purpose (NoEndpoints, FailedMount while moving).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 00:50:37 +03:00

62 lines
1.9 KiB
YAML

---
apiVersion: v1
kind: ServiceAccount
metadata:
name: cluster-map
namespace: d8-cluster-map
{{- include "helm_lib_module_labels" (list . (dict "app" "cluster-map")) | nindent 2 }}
automountServiceAccountToken: true
---
# Read-only on exactly what the map shows. No Secrets, no ConfigMaps, no
# write verbs. pods/log backs the Logs tab, events and clusteralerts the
# problem badges, vulnerabilityreports (operator-trivy) the shield on
# cards, metrics.k8s.io the Load section. Actions (restart, scale…) never
# use this account: they run with the viewer's own token.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: d8:cluster-map
{{- include "helm_lib_module_labels" (list . (dict "app" "cluster-map")) | nindent 2 }}
rules:
- apiGroups: [""]
resources: ["namespaces", "pods", "services", "nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["pods/log"]
verbs: ["get"]
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "list", "watch"]
- apiGroups: ["deckhouse.io"]
resources: ["clusteralerts"]
verbs: ["get", "list", "watch"]
- apiGroups: ["aquasecurity.github.io"]
resources: ["vulnerabilityreports"]
verbs: ["get", "list", "watch"]
- apiGroups: ["metrics.k8s.io"]
resources: ["pods", "nodes"]
verbs: ["get", "list"]
- apiGroups: ["apps"]
resources: ["deployments", "statefulsets", "daemonsets"]
verbs: ["get", "list", "watch"]
- apiGroups: ["batch"]
resources: ["cronjobs"]
verbs: ["get", "list", "watch"]
- apiGroups: ["networking.k8s.io"]
resources: ["ingresses"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: d8:cluster-map
{{- include "helm_lib_module_labels" (list . (dict "app" "cluster-map")) | nindent 2 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: d8:cluster-map
subjects:
- kind: ServiceAccount
name: cluster-map
namespace: d8-cluster-map