03 controller gateway link

From Pandaala/Edgion · View interactive version

03 controller gateway link is an AI agent skill from the GitHub repository Pandaala/Edgion. Bidirectional gRPC sync architecture between Controller and Gateway — ConfigSync protocol, Watch/List mechanism, implementation on both sides.

How to use this skill

Skill file

03 Controller↔Gateway Link

Controller and Gateway communicate via bidirectional gRPC for configuration sync.

Gateway connects to Controller as a client, fetching the full state via List and incremental updates via Watch.

File index

| File | Topic | Recommended reading scenario |

|------|------|-------------|

| 00-overview.md | ConfigSync gRPC protocol overview | Understanding the sync protocol design, Proto definitions, version tracking |

| 01-controller-side.md | Controller-side gRPC server | Debugging ConfigSyncServer, WatchObj, ClientRegistry |

| 02-gateway-side.md | Gateway-side gRPC client | Debugging ConfigSyncClient, ClientCache, ConfHandler |

| webhook.md | Webhook provider (backendRef target + request-templating redesign) | Webhook outbound request shape, origin/custom allow-list, presence policy, controller-side template compile + secret resolution, consumer path_override API, health-reset semantics |

Architecture overview

  Controller                                          Gateway
┌─────────────────────────┐                ┌─────────────────────────┐
│                         │                │                         │
│  ResourceProcessor      │                │  ConfigSyncClient       │
│  └── ServerCache<T>     │   gRPC         │  ├── grpc_client        │
│      └── EventStore     │◄──────────────►│  └── ConfigClient       │
│                         │                │      └── ClientCache    │
│  ConfigSyncServer       │   List/Watch   │         └── EventDispatch
│  ├── WatchObj (per-kind)│──────────────►│             └── ConfHandler
│  └── ClientRegistry    │                │                         │
│                         │   WatchMeta    │                         │
│  server_id (per-start)  │──────────────►│  Detects server_id change
│                         │                │  → triggers full relist │
└─────────────────────────┘                └─────────────────────────┘

Core concepts

millisecond string per published server instance) identify a per-kind List/Watch generation.

no_sync_kinds; an explicit list replaces that default. ConfigMap is currently advertised by

the Controller unless excluded, but the Gateway intentionally has no ConfigMap cache.

edgion-controller/src/conf_sync (server), edgion-gateway/src/conf_sync (client), and

edgion-cli/src/certs (certificate generation).

Testing infrastructure

every current ResourceKind in tier order; the coverage test currently asserts all 22 concrete

kinds. See 05-testing/02-cache-residue-detection.md.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.