# netapp/trident architecture

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

- Interactive diagram: https://gitdiagram.com/netapp/trident
- Repository: https://github.com/netapp/trident
- Video tour (about a minute): https://gitdiagram.com/netapp/trident/video

## Overview

NetApp Trident is a Kubernetes storage orchestrator that provisions and manages persistent storage for workloads through CSI, with REST and CRD interfaces and an operator for installation and configuration. The main workload path runs from a Kubernetes CSI request through controller logic and the orchestrator into storage pools and drivers; node-side CSI handles volume operations. The README also documents snapshots, backups, replication, cloning, and portability. Some subsystem connections are documented rather than visible in sampled implementation, so those edges are marked unverified.

Main entry points: [`core/orchestrator_core.go`](https://github.com/netapp/trident/blob/master/core/orchestrator_core.go) (Orchestrator Core), [`frontend/csi/controller_server.go`](https://github.com/netapp/trident/blob/master/frontend/csi/controller_server.go) (CSI Controller), [`operator/controllers/orchestrator/controller.go`](https://github.com/netapp/trident/blob/master/operator/controllers/orchestrator/controller.go) (Trident Operator), [`frontend/csi/node_server.go`](https://github.com/netapp/trident/blob/master/frontend/csi/node_server.go) (CSI Node)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User Interfaces"]
  node_csi["CSI Controller"]
  node_csi_node["CSI Node<br/>[node_server.go]"]
  node_rest["REST API"]
  node_cli["Trident CLI"]
  node_crd["CRD Controller<br/>[crd_controller.go]"]
end

subgraph group_orchestration["Orchestration"]
  node_core["Orchestrator Core"]
  node_cache["Runtime Cache<br/>[storage_class.go]"]
  node_persistence[("Persistent Store<br/>[storageclass.go]")]
end

subgraph group_storage["Storage Management"]
  node_storage_class["Storage Classes<br/>[storage_class.go]"]
  node_pool["Storage Pools<br/>[storage_pool.go]"]
  node_drivers["Storage Drivers<br/>[storage_client.go]"]
end

subgraph group_operations["Kubernetes Operations"]
  node_operator["Trident Operator<br/>[controller.go]"]
  node_configurator["Configurator<br/>[controller.go]"]
  node_resource_monitor["Resource Monitor"]
end

subgraph group_extensions["Additional Capabilities"]
  node_autogrow["Auto-Grow"]
  node_snapshot["Snapshots"]
  node_node_ops["Node Operations<br/>[core.go]"]
end

node_workload(("Kubernetes Workload"))
node_kubernetes(("Kubernetes API"))
node_netapp[("NetApp Storage")]

node_workload -.->|"requests storage"| node_csi
node_csi -->|"orchestrates volumes"| node_core
node_csi_node -.->|"manages node volumes"| node_core
node_rest -->|"handles API calls"| node_core
node_cli -->|"invokes REST"| node_rest
node_crd -->|"reconciles resources"| node_core
node_core -.->|"uses cache"| node_cache
node_core -.->|"persists state"| node_persistence
node_core -->|"manages classes"| node_storage_class
node_storage_class -->|"matches pools"| node_pool
node_pool -->|"uses backend"| node_drivers
node_drivers -.->|"controls storage"| node_netapp
node_kubernetes -.->|"provides resources"| node_operator
node_operator -.->|"configures drivers"| node_configurator
node_operator -.->|"monitors classes"| node_resource_monitor
node_resource_monitor -->|"syncs configuration"| node_configurator
node_core -.->|"supports auto-grow"| node_autogrow
node_csi -->|"handles snapshots"| node_snapshot
node_csi_node -.->|"performs node work"| node_node_ops
node_core -.->|"supports data protection"| node_snapshot

click node_csi "https://github.com/netapp/trident/blob/master/frontend/csi/controller_server.go"
click node_csi_node "https://github.com/netapp/trident/blob/master/frontend/csi/node_server.go"
click node_rest "https://github.com/netapp/trident/blob/master/frontend/rest/controller_handlers.go"
click node_cli "https://github.com/netapp/trident/blob/master/cli/cmd/get_storageclass.go"
click node_crd "https://github.com/netapp/trident/blob/master/frontend/crd/controller/crd_controller.go"
click node_core "https://github.com/netapp/trident/blob/master/core/orchestrator_core.go"
click node_cache "https://github.com/netapp/trident/blob/master/core/concurrent_cache/storage_class.go"
click node_persistence "https://github.com/netapp/trident/blob/master/persistent_store/crd/apis/netapp/v1/storageclass.go"
click node_storage_class "https://github.com/netapp/trident/blob/master/storage_class/storage_class.go"
click node_pool "https://github.com/netapp/trident/blob/master/storage/storage_pool.go"
click node_drivers "https://github.com/netapp/trident/blob/master/storage_drivers/ontap/api/rest/client/storage/storage_client.go"
click node_operator "https://github.com/netapp/trident/blob/master/operator/controllers/orchestrator/controller.go"
click node_configurator "https://github.com/netapp/trident/blob/master/operator/controllers/configurator/controller.go"
click node_resource_monitor "https://github.com/netapp/trident/blob/master/operator/controllers/resourcemonitor/storageclass_handler.go"
click node_autogrow "https://github.com/netapp/trident/blob/master/frontend/autogrow/autogrow_orchestrator.go"
click node_snapshot "https://github.com/netapp/trident/blob/master/frontend/csi/group_controller_server.go"
click node_node_ops "https://github.com/netapp/trident/blob/master/core/node/core.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_csi,node_csi_node,node_rest,node_cli,node_crd toneBlue
class node_core,node_cache,node_persistence,node_netapp toneAmber
class node_storage_class,node_pool,node_drivers,node_kubernetes toneMint
class node_operator,node_configurator,node_resource_monitor toneRose
class node_autogrow,node_snapshot,node_node_ops,node_workload toneIndigo
```

## Components

### User Interfaces

- [CSI Controller](https://github.com/netapp/trident/blob/master/frontend/csi/controller_server.go): `frontend/csi/controller_server.go`
- [CSI Node](https://github.com/netapp/trident/blob/master/frontend/csi/node_server.go): `frontend/csi/node_server.go`
- [REST API](https://github.com/netapp/trident/blob/master/frontend/rest/controller_handlers.go): `frontend/rest/controller_handlers.go`
- [Trident CLI](https://github.com/netapp/trident/blob/master/cli/cmd/get_storageclass.go): `cli/cmd/get_storageclass.go`
- [CRD Controller](https://github.com/netapp/trident/blob/master/frontend/crd/controller/crd_controller.go): `frontend/crd/controller/crd_controller.go`

### Orchestration

- [Orchestrator Core](https://github.com/netapp/trident/blob/master/core/orchestrator_core.go): `core/orchestrator_core.go`
- [Runtime Cache](https://github.com/netapp/trident/blob/master/core/concurrent_cache/storage_class.go): `core/concurrent_cache/storage_class.go`
- [Persistent Store](https://github.com/netapp/trident/blob/master/persistent_store/crd/apis/netapp/v1/storageclass.go): `persistent_store/crd/apis/netapp/v1/storageclass.go`

### Storage Management

- [Storage Classes](https://github.com/netapp/trident/blob/master/storage_class/storage_class.go): `storage_class/storage_class.go`
- [Storage Pools](https://github.com/netapp/trident/blob/master/storage/storage_pool.go): `storage/storage_pool.go`
- [Storage Drivers](https://github.com/netapp/trident/blob/master/storage_drivers/ontap/api/rest/client/storage/storage_client.go): `storage_drivers/ontap/api/rest/client/storage/storage_client.go`

### Kubernetes Operations

- [Trident Operator](https://github.com/netapp/trident/blob/master/operator/controllers/orchestrator/controller.go): `operator/controllers/orchestrator/controller.go`
- [Configurator](https://github.com/netapp/trident/blob/master/operator/controllers/configurator/controller.go): `operator/controllers/configurator/controller.go`
- [Resource Monitor](https://github.com/netapp/trident/blob/master/operator/controllers/resourcemonitor/storageclass_handler.go): `operator/controllers/resourcemonitor/storageclass_handler.go`

### Additional Capabilities

- [Auto-Grow](https://github.com/netapp/trident/blob/master/frontend/autogrow/autogrow_orchestrator.go): `frontend/autogrow/autogrow_orchestrator.go`
- [Snapshots](https://github.com/netapp/trident/blob/master/frontend/csi/group_controller_server.go): `frontend/csi/group_controller_server.go`
- [Node Operations](https://github.com/netapp/trident/blob/master/core/node/core.go): `core/node/core.go`

### Other components

- **Kubernetes Workload**
- **Kubernetes API**
- **NetApp Storage**

## Connections

- Kubernetes Workload → CSI Controller: requests storage
- CSI Controller → Orchestrator Core: orchestrates volumes (evidence: `frontend/csi/controller_server.go`)
- CSI Node → Orchestrator Core: manages node volumes
- REST API → Orchestrator Core: handles API calls (evidence: `frontend/rest/controller_handlers.go`)
- Trident CLI → REST API: invokes REST (evidence: `cli/cmd/get_storageclass.go`)
- CRD Controller → Orchestrator Core: reconciles resources (evidence: `frontend/crd/controller/crd_controller.go`)
- Orchestrator Core → Runtime Cache: uses cache
- Orchestrator Core → Persistent Store: persists state
- Orchestrator Core → Storage Classes: manages classes (evidence: `core/orchestrator_core.go`)
- Storage Classes → Storage Pools: matches pools (evidence: `storage_class/storage_class.go`)
- Storage Pools → Storage Drivers: uses backend (evidence: `storage/storage_pool.go`)
- Storage Drivers → NetApp Storage: controls storage
- Kubernetes API → Trident Operator: provides resources
- Trident Operator → Configurator: configures drivers
- Trident Operator → Resource Monitor: monitors classes
- Resource Monitor → Configurator: syncs configuration (evidence: `operator/controllers/resourcemonitor/storageclass_handler.go`)
- Orchestrator Core → Auto-Grow: supports auto-grow
- CSI Controller → Snapshots: handles snapshots (evidence: `frontend/csi/controller_server.go`)
- CSI Node → Node Operations: performs node work
- Orchestrator Core → Snapshots: supports data protection
