How gardener/dashboard works
Purpose and topology
Gardener Dashboard is a Kubernetes/Gardener management dashboard: a browser SPA backed by a Node.js API that reads and mutates Gardener resources. It is a Yarn monorepo with deployable frontend/backend, shared Kubernetes and operational packages, and Helm charts. Primary runtime entry points are frontend/src/main.js, backend/server.js, and backend/lib/server.js.
Browser application
The Vue/Vuetify SPA owns login, project selection, cluster (“Shoot”) and Seed administration, credentials, terminals, quotas, and member workflows. Routes render views; composables and stores encapsulate UI state and API operations.
• frontend/src/main.js
• frontend/src/router/index.js
• frontend/src/store/index.js
UI-to-server traffic is centralized through the API composable; WebSocket/socket state supports live backend-dispatched resource updates.
• frontend/src/composables/useApi/index.js
• frontend/src/composables/useSocketEventHandler.js
• frontend/src/store/socket/index.js
Backend HTTP, authentication, and API boundary
The backend is a Node.js server/application with middleware, authentication/authorization, OpenAPI exposure, health checks, REST route registration, and Socket.IO-style IO dispatch. It is the trust boundary between browser sessions and Kubernetes/Gardener APIs.
• backend/lib/app.js
• backend/lib/server.js
• backend/lib/routes/index.js
Routes map dashboard resources—projects, shoots, seeds, credentials, terminals, tickets—to service-layer operations, rather than exposing Kubernetes access directly to the frontend.
• backend/lib/routes/shoots.js
• backend/lib/routes/projects.js
• backend/lib/routes/terminals.js
Gardener/Kubernetes resource services
Backend services implement domain operations and transform/authorize access to Gardener custom resources and Kubernetes resources. They cover Shoots, Seeds, projects/members, quotas, cloud profiles and credentials, managed seeds, and terminals.
• backend/lib/services/shoots.js
• backend/lib/services/projects.js
• backend/lib/services/cloudProviderCredentials.js
The shared Kubernetes client provides HTTP access, resource-group definitions, errors, pagination, and informer primitives. Kubeconfig/client configuration determines the Kubernetes API connection and authentication behavior.
• packages/kube-client/lib/Client.js
• packages/kube-client/lib/resources/GardenerCore.js
• packages/kube-config/lib/ClientConfig.js
Live state, cache, and event propagation
The backend watches selected Kubernetes resources, maintains caches, and propagates changes to connected UI clients. This separates expensive API watches/listing from browser requests and supplies real-time project, shoot, seed, and managed-seed updates.
• backend/lib/watches/index.js
• backend/lib/cache/index.js
• backend/lib/io/dispatcher.js
Underlying cache/informer machinery supports list/watch reflection, local stores, and backoff behavior.
• packages/kube-client/lib/cache/Informer.js
• packages/kube-client/lib/cache/Reflector.js
External integrations and operations
The backend integrates with OIDC/JWT security, Kubernetes API servers, GitHub (ticket synchronization and verified webhooks), and Prometheus-compatible metrics. Request/session pooling and logging are shared package concerns.
• backend/lib/security/jose.js
• backend/lib/github/SyncManager.js
• packages/monitor/lib/metrics.js
Deployment model
Docker packages the application; Helm deploys dashboard runtime resources (Deployment, Service, Ingress, config/assets, OIDC/GitHub/kubeconfig/session secrets) and application RBAC. A separate identity chart deploys supporting identity infrastructure.
• Dockerfile
• charts/gardener-dashboard/charts/runtime/templates/dashboard/deployment.yaml
• charts/gardener-dashboard/charts/application/templates/dashboard/clusterrole.yaml
Main entry points: app.js HTTP application · main.js Vue dashboard · Client.js Kubernetes client · index.js Watch cache
Components 21
Browser SPA
- Vue dashboard · Management UI for Gardener resources.
frontend/src/main.js - Routes and views
frontend/src/router/index.js - UI state
frontend/src/store/index.js - API client · Centralizes browser API calls.
frontend/src/composables/useApi/index.js - Live socket state
frontend/src/composables/useSocketEventHandler.js
Backend API
- HTTP application · Middleware, authentication, OpenAPI, health, and IO boundary.
backend/lib/app.js - REST routes · Maps dashboard resources to domain services.
backend/lib/routes/index.js - Gardener services · Authorizes and operates on shoots, projects, and credentials.
backend/lib/services/shoots.js - Watch cache · Maintains cached Gardener resource state.
backend/lib/watches/index.js - Event dispatcher · Publishes resource changes to connected clients.
backend/lib/io/dispatcher.js - Server runtime
backend/lib/server.js
Gardener / Kubernetes
- Kubernetes client config · Controls API endpoint and authentication.
packages/kube-config/lib/ClientConfig.js - Kubernetes client · HTTP access and Gardener resource definitions.
packages/kube-client/lib/Client.js - Informer / reflector · List-watch reflection, local stores, and backoff.
packages/kube-client/lib/cache/Informer.js - Gardener Kubernetes APIs · Gardener custom resources and Kubernetes resources.
packages/kube-client/lib/resources/GardenerCore.js
External integrations
- OIDC / JWT
backend/lib/security/jose.js - GitHub tickets · Synchronizes tickets and verifies webhooks.
backend/lib/github/SyncManager.js - Prometheus metrics
packages/monitor/lib/metrics.js
Deployment
- Container image
Dockerfile - Runtime Helm chart · Deploys dashboard runtime, secrets, and ingress resources.
charts/gardener-dashboard/charts/runtime/templates/dashboard/deployment.yaml - Application RBAC · Grants dashboard Kubernetes permissions.
charts/gardener-dashboard/charts/application/templates/dashboard/clusterrole.yaml
Connections 21
- Vue dashboard → Routes and views: renders
- Vue dashboard → UI state: uses
- Vue dashboard → API client: calls
- API client → HTTP application: HTTPS API
- Vue dashboard → Live socket state: receives live state
- Live socket state → Event dispatcher: socket events
- Server runtime → HTTP application: hosts
- HTTP application → OIDC / JWT: authenticates with
- HTTP application → REST routes: registers
- REST routes → Gardener services: invokes
- Gardener services → Kubernetes client: reads and mutates
- Kubernetes client config → Kubernetes client: configures
- Kubernetes client → Gardener Kubernetes APIs: Kubernetes API
- Watch cache → Informer / reflector: uses
- Informer / reflector → Kubernetes client: list / watch
- Watch cache → Event dispatcher: resource changes
- HTTP application → GitHub tickets: ticket sync / webhooks
- HTTP application → Prometheus metrics: emits
- Container image → Server runtime: packages
- Runtime Helm chart → Container image: deploys
- Application RBAC → Gardener Kubernetes APIs: authorizes access