Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

3 Kong features that make it easier to extend Kong

Slide 3

Slide 3 text

3 Senior Engineer Vincent Behar https://twitter.com/vbehar Twitter French video game company Ubisoft https://hachyderm.io/@vbehar Mastodon ABOUT ME @vbehar Slack Kong Community https://github.com/vbehar GitHub

Slide 4

Slide 4 text

4 Building a Control Plane on top of Kong’s Control Plane 3 Kong features that make it easier to extend Kong • Context • DecK – as a Go library • Dry Run mode • Event Hooks

Slide 5

Slide 5 text

5 API Gateway for an Internal Developer Platform - KubeCon Talk on youtube CONTEXT Internal Developer Platform • Multiple services / teams • Managed Kubernetes clusters • MongoDB • Unified experience • JSON REST APIs • OpenAPI API Gateway • Single entry point • Gateway admins • Enforce rules (security) • Service developers • Self-service • OpenAPI integration • Kong knowledge?

Slide 6

Slide 6 text

6 CONTEXT Gateway Admin Service Developers Self-service Enforce security Sync Automatic ingestion

Slide 7

Slide 7 text

7 Control Plane on top of Kong’s Control Plane CONTEXT Kubernetes Operator • ✅ Self-service • ✅ Self-healing • Kong’s Kubernetes Ingress Controller? • ❌ OpenAPI integration • ❌ Enforcing our own rules Implementation • Workspaces (admins) • Services (developers) • Routes (OpenAPI) • Plugins

Slide 8

Slide 8 text

8 CONTEXT Gateway Admin Service Developers Plugins configs

Slide 9

Slide 9 text

9 Workspace & Service USAGE

Slide 10

Slide 10 text

10 3 features that makes it easier to extend Kong WHY KONG? • DecK – as a Go library • Dry Run mode • Event Hooks

Slide 11

Slide 11 text

11 As a Go library DECK Challenges • Source of truth « outside » Kong • Kubernetes API • Declarative Config Management • Reconciliation with Kong API • Creations • Updates • Deletions DecK • CLI tool to sync state with Kong API • Written in Go • Load, merge & sync state • JSON/YAML support • Embed as a Go lib • ✅ Integration • ✅ Parsable output

Slide 12

Slide 12 text

12 USING DECK Dev Generate desired state Get current state DecK Merge both states Sync new state with Kong Render final state JSON diff JSON / YAML Final state

Slide 13

Slide 13 text

13 Safe & early feedback DRY RUN MODE Why? • Test config changes • Very early feedback • Safe operations • State never persisted on disk Flow • Client • Kubernetes API Server • Admission webhook • Kubernetes Operator • DecK Sync • Dry-run Flag • Kong • Validations, …

Slide 14

Slide 14 text

14 With Kubernetes USING DRY RUN MODE • Server-side apply • Server-side dry-run • Mutating admission webhook

Slide 15

Slide 15 text

15 Avoid configuration drift EVENT HOOKS Event Hooks? • Kong Enterprise feature • Notify our operator for each change • HTTP Webhook • Avoid configuration drift • Force people to use the operator Using Event Hooks • Tag every entity • Filter on the tag • To trigger the reconciliation • Kubernetes internal queue • Kong 2.x • Needs to be restarted before…

Slide 16

Slide 16 text

16 CONCLUSION Putting it all together • DecK • Easy reconciliation • JSON/YAML output • Dry Run Mode • Safe operations • Event Hooks • Avoid config drift User Experience • ✅ Self-service • ✅ Self-healing • ✅ Safe

Slide 17

Slide 17 text

Thank you. Questions?