# istio-ecosystem/admiral architecture

> Architecture diagram of the GitHub repository istio-ecosystem/admiral, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/istio-ecosystem/admiral
- Repository: https://github.com/istio-ecosystem/admiral

## Overview

Admiral automates service discovery and Istio configuration across Kubernetes clusters. Operators define Dependency and GlobalTrafficPolicy resources; Kubernetes resource events are handled by controllers, which coordinate cluster-wide discovery and generate ServiceEntries, VirtualServices, and DestinationRules. The README also documents rollout/deployment and policy updates, workload data in DynamoDB, and optional API/metrics endpoints. The graph combines those documented capabilities with relationships visible in sampled source; unsampled controller wiring is not inferred.

Main entry points: [`admiral/pkg/clusters/serviceentry.go`](https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/clusters/serviceentry.go) (Service discovery), [`admiral/pkg/apis/admiral/server/server.go`](https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/apis/admiral/server/server.go) (HTTP server), [`admiral/cmd/admiral/cmd/root.go`](https://github.com/istio-ecosystem/admiral/blob/master/admiral/cmd/admiral/cmd/root.go) (Admiral command), [`admiral/pkg/apis/admiral/v1alpha1/type.go`](https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/apis/admiral/v1alpha1/type.go) (Admiral resource types)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime orchestration"]
  node_entry["Admiral command<br/>[root.go]"]
  node_eventqueue["Event processing<br/>[controller.go]"]
end

subgraph group_resources["Custom resources"]
  node_customresources["Admiral resource types<br/>[type.go]"]
  node_crdclient["CRD client"]
  node_informers["Resource informers<br/>[routingpolicy.go]"]
  node_policycontrollers["Policy controllers"]
end

subgraph group_discovery["Discovery and routing"]
  node_servicecontroller["Service controller<br/>[service.go]"]
  node_clusterregistry["Cluster registry<br/>[registry.go]"]
  node_serviceentrylogic["Service discovery<br/>[serviceentry.go]"]
  node_virtualrouting["VirtualService routing"]
end

subgraph group_mesh["Istio configuration"]
  node_vscontroller["VirtualService controller<br/>[virtualservice.go]"]
  node_serviceentrycontroller["ServiceEntry controller<br/>[serviceentry.go]"]
  node_destinations["DestinationRule handling"]
  node_vsresources["VirtualService handling"]
end

subgraph group_operations["Operations and integrations"]
  node_kubernetes(("Kubernetes API"))
  node_dynamodb[("DynamoDB workload data")]
  node_httpapi["Admiral HTTP API<br/>[handlers.go]"]
  node_httpserver["HTTP server<br/>[server.go]"]
end

node_operator(("Mesh operator"))
node_client(("API user"))

node_operator -->|"configures"| node_customresources
node_entry -->|"initializes"| node_clusterregistry
node_entry -->|"starts"| node_httpserver
node_customresources -->|"served by"| node_crdclient
node_informers -->|"lists and watches"| node_crdclient
node_policycontrollers -->|"registers informer"| node_informers
node_eventqueue -->|"fetches latest"| node_kubernetes
node_servicecontroller -.->|"handles service events"| node_serviceentrylogic
node_clusterregistry -.->|"discovers clusters"| node_kubernetes
node_serviceentrylogic -->|"writes workload data"| node_dynamodb
node_serviceentrylogic -->|"derives routes"| node_virtualrouting
node_serviceentrylogic -.->|"updates ServiceEntries"| node_serviceentrycontroller
node_serviceentrylogic -.->|"derives DestinationRules"| node_destinations
node_serviceentrylogic -.->|"updates VirtualServices"| node_vsresources
node_virtualrouting -.->|"uses routing cache"| node_vscontroller
node_serviceentrycontroller -->|"provisions resources"| node_kubernetes
node_destinations -->|"provisions resources"| node_kubernetes
node_vsresources -->|"provisions resources"| node_kubernetes
node_client -->|"requests"| node_httpserver
node_httpserver -->|"routes requests"| node_httpapi

click node_entry "https://github.com/istio-ecosystem/admiral/blob/master/admiral/cmd/admiral/cmd/root.go"
click node_eventqueue "https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/controller/admiral/controller.go"
click node_customresources "https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/apis/admiral/v1alpha1/type.go"
click node_crdclient "https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/client/clientset/versioned/typed/admiral/v1alpha1/clientconnectionconfig.go"
click node_informers "https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/client/informers/externalversions/admiral/v1alpha1/routingpolicy.go"
click node_policycontrollers "https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/controller/admiral/clientconnectionconfigcontroller.go"
click node_servicecontroller "https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/controller/admiral/service.go"
click node_clusterregistry "https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/registry/registry.go"
click node_serviceentrylogic "https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/clusters/serviceentry.go"
click node_virtualrouting "https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/clusters/virtualservice_routing.go"
click node_vscontroller "https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/controller/istio/virtualservice.go"
click node_serviceentrycontroller "https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/controller/istio/serviceentry.go"
click node_destinations "https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/clusters/destinationrule_handler.go"
click node_vsresources "https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/clusters/virtualservice_handler.go"
click node_httpapi "https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/apis/admiral/routes/handlers.go"
click node_httpserver "https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/apis/admiral/server/server.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_eventqueue,node_client toneBlue
class node_customresources,node_crdclient,node_informers,node_policycontrollers toneAmber
class node_servicecontroller,node_clusterregistry,node_serviceentrylogic,node_virtualrouting toneMint
class node_vscontroller,node_serviceentrycontroller,node_destinations,node_vsresources toneRose
class node_kubernetes,node_dynamodb,node_httpapi,node_httpserver,node_operator toneIndigo
```

## Components

### Runtime orchestration

- [Admiral command](https://github.com/istio-ecosystem/admiral/blob/master/admiral/cmd/admiral/cmd/root.go): `admiral/cmd/admiral/cmd/root.go`
- [Event processing](https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/controller/admiral/controller.go): `admiral/pkg/controller/admiral/controller.go`

### Custom resources

- [Admiral resource types](https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/apis/admiral/v1alpha1/type.go): `admiral/pkg/apis/admiral/v1alpha1/type.go`
- [CRD client](https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/client/clientset/versioned/typed/admiral/v1alpha1/clientconnectionconfig.go): `admiral/pkg/client/clientset/versioned/typed/admiral/v1alpha1/clientconnectionconfig.go`
- [Resource informers](https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/client/informers/externalversions/admiral/v1alpha1/routingpolicy.go): `admiral/pkg/client/informers/externalversions/admiral/v1alpha1/routingpolicy.go`
- [Policy controllers](https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/controller/admiral/clientconnectionconfigcontroller.go): `admiral/pkg/controller/admiral/clientconnectionconfigcontroller.go`

### Discovery and routing

- [Service controller](https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/controller/admiral/service.go): `admiral/pkg/controller/admiral/service.go`
- [Cluster registry](https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/registry/registry.go): `admiral/pkg/registry/registry.go`
- [Service discovery](https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/clusters/serviceentry.go): `admiral/pkg/clusters/serviceentry.go`
- [VirtualService routing](https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/clusters/virtualservice_routing.go): `admiral/pkg/clusters/virtualservice_routing.go`

### Istio configuration

- [VirtualService controller](https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/controller/istio/virtualservice.go): `admiral/pkg/controller/istio/virtualservice.go`
- [ServiceEntry controller](https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/controller/istio/serviceentry.go): `admiral/pkg/controller/istio/serviceentry.go`
- [DestinationRule handling](https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/clusters/destinationrule_handler.go): `admiral/pkg/clusters/destinationrule_handler.go`
- [VirtualService handling](https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/clusters/virtualservice_handler.go): `admiral/pkg/clusters/virtualservice_handler.go`

### Operations and integrations

- **Kubernetes API**
- **DynamoDB workload data**
- [Admiral HTTP API](https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/apis/admiral/routes/handlers.go): `admiral/pkg/apis/admiral/routes/handlers.go`
- [HTTP server](https://github.com/istio-ecosystem/admiral/blob/master/admiral/pkg/apis/admiral/server/server.go): `admiral/pkg/apis/admiral/server/server.go`

### Other components

- **Mesh operator**
- **API user**

## Connections

- Mesh operator → Admiral resource types: configures (evidence: `README.md`)
- Admiral command → Cluster registry: initializes (evidence: `admiral/cmd/admiral/cmd/root.go`)
- Admiral command → HTTP server: starts (evidence: `admiral/cmd/admiral/cmd/root.go`)
- Admiral resource types → CRD client: served by (evidence: `admiral/pkg/client/clientset/versioned/typed/admiral/v1alpha1/clientconnectionconfig.go`)
- Resource informers → CRD client: lists and watches (evidence: `admiral/pkg/client/informers/externalversions/admiral/v1alpha1/routingpolicy.go`)
- Policy controllers → Resource informers: registers informer (evidence: `admiral/pkg/controller/admiral/clientconnectionconfigcontroller.go`)
- Event processing → Kubernetes API: fetches latest (evidence: `admiral/pkg/controller/admiral/controller.go`)
- Service controller → Service discovery: handles service events
- Cluster registry → Kubernetes API: discovers clusters
- Service discovery → DynamoDB workload data: writes workload data (evidence: `README.md`)
- Service discovery → VirtualService routing: derives routes (evidence: `admiral/pkg/clusters/serviceentry.go`)
- Service discovery → ServiceEntry controller: updates ServiceEntries
- Service discovery → DestinationRule handling: derives DestinationRules
- Service discovery → VirtualService handling: updates VirtualServices
- VirtualService routing → VirtualService controller: uses routing cache
- ServiceEntry controller → Kubernetes API: provisions resources (evidence: `README.md`)
- DestinationRule handling → Kubernetes API: provisions resources (evidence: `README.md`)
- VirtualService handling → Kubernetes API: provisions resources (evidence: `README.md`)
- API user → HTTP server: requests
- HTTP server → Admiral HTTP API: routes requests (evidence: `admiral/pkg/apis/admiral/server/server.go`)
