Problems: cards, namespace and node boxes and the tree carry a yellow or red badge, computed on the server from object state (crash loops, image pulls, pending and unschedulable pods, readiness older than 2 minutes, a stuck rollout, a failed CronJob run, Services without endpoints, Ingresses to missing Services, node conditions), recent Warning events (notable reasons at once, others after five repeats) and Deckhouse ClusterAlerts mapped by their labels. A Problems panel lists them all. Checked against the live cluster: upmeter's synthetic probe pods and ingress-nginx's fakeservice Ingresses are excluded, they fail on purpose. Actions: restart, scale, run a CronJob now, suspend/resume, delete a pod, cordon/uncordon. They run with the viewer's bearer token from the DexAuthenticator (sendAuthorizationHeader), buttons follow a SelfSubjectAccessReview, the service account stays read-only. Cross-site writes are refused by Sec-Fetch-Site/Origin/content type. Scale retries on conflict: right after a restart a single Get+Update got 409. Load (metrics.k8s.io against requests/limits/allocatable, per-pod table) and an Events tab. Cards are locked until the padlock is opened; the map exports to PNG; the page refreshes badges every minute in place. Performance, measured on the live cluster: - layout of big views 3-4x faster: equal-size cards with no edges are laid out on the grid ELK would produce (same sizes, checked against ELK on a frozen node view), skipping ~8 ms per ELK call; - hubble-relay gets ~20% fewer flows: the to-overlay copy of pod-to-pod traffic is dropped at the agents; 331/331 directions unchanged; - static files carry ETags, a reload revalidates instead of pulling ~2 MB of vendored scripts. KUBECONFIG is honoured for running the binary on a workstation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
44 lines
1.9 KiB
YAML
44 lines
1.9 KiB
YAML
{{- $moduleGateway := dict }}
|
|
{{- include "helm_lib_module_gateway" (list . $moduleGateway) }}
|
|
{{- $ingressEnabled := eq (include "helm_lib_module_ingress_enabled" .) "true" }}
|
|
{{- $gatewayEnabled := eq (include "helm_lib_module_gateway_enabled" .) "true" }}
|
|
{{- if and .Values.clusterMap.internal.deployDexAuthenticator (or $ingressEnabled $gatewayEnabled) }}
|
|
---
|
|
apiVersion: deckhouse.io/v1
|
|
kind: DexAuthenticator
|
|
metadata:
|
|
name: cluster-map
|
|
namespace: d8-cluster-map
|
|
{{- include "helm_lib_module_labels" (list . (dict "app" "dex-authenticator" "name" "cluster-map")) | nindent 2 }}
|
|
spec:
|
|
applicationDomain: {{ include "helm_lib_module_public_domain" (list . "cluster-map") }}
|
|
{{- if and $ingressEnabled (include "helm_lib_module_https_ingress_tls_enabled" .) }}
|
|
applicationIngressCertificateSecretName: {{ include "helm_lib_module_https_secret_name" (list . "ingress-tls") }}
|
|
{{- end }}
|
|
{{- if and $gatewayEnabled (include "helm_lib_module_https_route_tls_enabled" .) }}
|
|
gatewayAPI:
|
|
applicationHTTPRouteListenerSetName: cluster-map
|
|
{{- end }}
|
|
applicationIngressClassName: {{ include "helm_lib_module_ingress_class" . | quote }}
|
|
{{- if .Values.clusterMap.actions.enabled }}
|
|
# actions run as the viewer: the user's token goes to the module in the
|
|
# Authorization header (and the token's audience includes kubernetes)
|
|
sendAuthorizationHeader: true
|
|
{{- end }}
|
|
{{- with .Values.clusterMap.auth.allowedUserEmails }}
|
|
allowedEmails:
|
|
{{- . | toYaml | nindent 2 }}
|
|
{{- end }}
|
|
{{- with .Values.clusterMap.auth.allowedUserGroups }}
|
|
allowedGroups:
|
|
{{- . | toYaml | nindent 2 }}
|
|
{{- end }}
|
|
{{- with .Values.clusterMap.auth.whitelistSourceRanges }}
|
|
whitelistSourceRanges:
|
|
{{- . | toYaml | nindent 2 }}
|
|
{{- end }}
|
|
{{- include "helm_lib_node_selector" (tuple . "system") | nindent 2 }}
|
|
{{- include "helm_lib_tolerations" (tuple . "system") | nindent 2 }}
|
|
highAvailability: false
|
|
{{- end }}
|