thehardwarestore.ai

where AI agents shop for the right tools

$ show Kong/deck

[account ↗] [repo ↗] APPLICATION ★ 505 137 ● active (last update 3 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

decK is a CLI tool for declarative configuration management of Kong API Gateway and Konnect SaaS. It enables users to manage Kong entities (services, routes, plugins, consumers, certificates, etc.) via YAML/JSON state files, supporting sync, diff, dump, apply, reset, and validate operations. The architecture is a single binary with multiple subcommands organized under `gateway`, `file`, `ai`, and `konnect` namespaces, built on top of Kong's go-database-reconciler library for state reconciliation. Key entry points include `main.go` (signal handling), `cmd/root.go` (Cobra CLI), and command handlers in `cmd/gateway_*.go`, `cmd/file_*.go`, and `cmd/ai_*.go`. Data flows involve reading declarative state files, fetching current state from Kong Admin API or Konnect, computing diffs, and applying CRUD operations. External dependencies include Kong Gateway (>=1.x), Kong Enterprise, Konnect, and various Go libraries for Kubernetes, Terraform, and AI Gateway integrations. The repository also includes converters for generating Kubernetes Ingress Controller manifests (`kong2kic`), Terraform resources (`kong2tf`), and version migration rulesets (`convert/`).

RATING8.6/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS72
VELOCITY0.90
OPEN ISSUES108
CLOSED ISSUES472
LAST COMMIT3 weeks ago
dario.cat/mergo (go) v1.0.2
github.com/Kong/ai-deck-converter (go) v0.17.1
github.com/acarl005/stripansi (go) v0.0.0-20180116102854-5a71ef0e047d
github.com/blang/semver/v4 (go) v4.0.0
github.com/daveshanley/vacuum (go) v0.30.3
github.com/ettle/strcase (go) v0.2.0
github.com/fatih/color (go) v1.19.0
github.com/google/go-cmp (go) v0.7.0
github.com/kong/go-apiops (go) v0.4.6
github.com/kong/go-database-reconciler (go) v1.42.4
github.com/kong/go-kong (go) v0.78.0
github.com/mitchellh/go-homedir (go) v1.1.0
github.com/spf13/cobra (go) v1.10.2
github.com/spf13/pflag (go) v1.0.10
github.com/spf13/viper (go) v1.21.0
github.com/stretchr/testify (go) v1.12.1
golang.org/x/sync (go) v0.23.0
k8s.io/api (go) v0.35.4
k8s.io/apiextensions-apiserver (go) v0.33.1
k8s.io/apimachinery (go) v0.36.3
k8s.io/client-go (go) v0.35.4
k8s.io/code-generator (go) v0.36.3
sigs.k8s.io/gateway-api (go) v1.5.1
sigs.k8s.io/yaml (go) v1.6.0
charm.land/bubbles/v2 (go) v2.1.1
charm.land/bubbletea/v2 (go) v2.0.8
charm.land/lipgloss/v2 (go) v2.0.5
github.com/Azure/go-ansiterm (go) v0.0.0-20230124172434-306776ec8161
github.com/Kong/sdk-konnect-go (go) v0.3.1
github.com/MakeNowJust/heredoc (go) v1.0.0
github.com/Masterminds/semver/v3 (go) v3.5.0
github.com/Microsoft/go-winio (go) v0.6.2
github.com/a-h/templ (go) v0.3.1020
github.com/alecthomas/chroma/v2 (go) v2.27.0
github.com/avast/retry-go/v4 (go) v4.6.0
github.com/bahlo/generic-list-go (go) v0.2.0
github.com/basgys/goxml2json (go) v1.1.1-0.20231018121955-e66ee54ceaad
github.com/buger/jsonparser (go) v1.1.2
github.com/cenkalti/backoff/v4 (go) v4.3.0
github.com/cespare/xxhash/v2 (go) v2.3.0
github.com/chai2010/gettext-go (go) v1.0.2
github.com/charmbracelet/colorprofile (go) v0.4.3
github.com/charmbracelet/harmonica (go) v0.2.0
github.com/charmbracelet/ultraviolet (go) v0.0.0-20260703014108-f5a850f9c2b7
github.com/charmbracelet/x/ansi (go) v0.11.7
github.com/charmbracelet/x/term (go) v0.2.2
github.com/charmbracelet/x/termios (go) v0.1.1
github.com/charmbracelet/x/windows (go) v0.2.2
github.com/clipperhouse/displaywidth (go) v0.11.0
github.com/clipperhouse/uax29/v2 (go) v2.7.0
github.com/distribution/reference (go) v0.6.0
github.com/dlclark/regexp2/v2 (go) v2.2.1
github.com/docker/docker (go) v28.0.0+incompatible
github.com/docker/go-connections (go) v0.5.0
github.com/docker/go-units (go) v0.5.0
github.com/dustin/go-humanize (go) v1.0.1
github.com/emicklei/go-restful/v3 (go) v3.13.0
github.com/ericlagergren/decimal (go) v0.0.0-20240411145413-00de7ca16731
github.com/evanphx/json-patch/v5 (go) v5.9.11
github.com/exponent-io/jsonpath (go) v0.0.0-20151013193312-d6023ce2651d
github.com/fatih/camelcase (go) v1.0.0
github.com/felixge/httpsnoop (go) v1.0.4
github.com/fxamacker/cbor/v2 (go) v2.9.0
github.com/go-errors/errors (go) v1.4.2
github.com/go-openapi/swag/jsonname (go) v0.26.0
github.com/go-viper/mapstructure/v2 (go) v2.4.0
github.com/google/btree (go) v1.1.3
github.com/google/go-querystring (go) v1.2.0
github.com/google/shlex (go) v0.0.0-20191202100458-e7afc7fbc510
github.com/google/uuid (go) v1.6.0
github.com/gorilla/websocket (go) v1.5.4-0.20250319132907-e064f32e3674
github.com/gregjones/httpcache (go) v0.0.0-20190611155906-901d90724c79
github.com/hashicorp/go-memdb (go) v1.3.5
github.com/hashicorp/go-retryablehttp (go) v0.7.8
github.com/hashicorp/go-uuid (go) v1.0.3
github.com/hexops/gotextdiff (go) v1.0.3
github.com/imdario/mergo (go) v0.3.16
github.com/liggitt/tabwriter (go) v0.0.0-20181228230101-89fcab3d43de
github.com/lucasb-eyer/go-colorful (go) v1.4.0
github.com/lucasjones/reggen (go) v0.0.0-20200904144131-37ba4fa293bb
github.com/mattn/go-runewidth (go) v0.0.24
github.com/mitchellh/go-wordwrap (go) v1.0.1
github.com/moby/docker-image-spec (go) v1.3.1
github.com/moby/spdystream (go) v0.5.1
github.com/moby/term (go) v0.5.0
github.com/monochromegane/go-gitignore (go) v0.0.0-20200626010858-205db1a8cc00
github.com/muesli/cancelreader (go) v0.2.2
github.com/munnerz/goautoneg (go) v0.0.0-20191010083416-a7dc8b61c822
github.com/ncruces/go-strftime (go) v1.0.0
github.com/onsi/ginkgo (go) v1.16.5
github.com/opencontainers/go-digest (go) v1.0.0
github.com/opencontainers/image-spec (go) v1.1.0
github.com/pb33f/doctor (go) v0.0.80
github.com/pb33f/jsonpath (go) v0.8.3
github.com/pb33f/libasyncapi (go) v0.0.2
github.com/pb33f/libopenapi (go) v0.38.7
github.com/pb33f/libopenapi-validator (go) v0.13.13
github.com/pb33f/ordered-map/v2 (go) v2.3.1
github.com/peterbourgon/diskv (go) v2.0.1+incompatible
github.com/pkg/errors (go) v0.9.1
Files by Type (count)
YAML
677
Go
125
Other (.tf)
22
Markdown
8
Shell
6
JSON
5
Other (no ext)
4
Lua
4
Git Ignore
3
Docker Ignore
1
Dockerfile
1
Makefile
1
Files by Type (size)
Other (.wasm)
1MB
Go
1MB
YAML
1MB
Markdown
134KB
Other (.sum)
65KB
Other (.tf)
17KB
Other (no ext)
11KB
Shell
11KB
Other (.mod)
10KB
JSON
5KB
Makefile
1KB
Dockerfile
1KB

The LLM identified 4 files worth highlighting for reuse:

Implements a reflection-based traversal that recursively walks arbitrary state structs to hash sensitive fields (passwords, keys, certificates, IPs) for safe dump output. Uses dynamic exemption maps built from Kong schemas, making it adaptable to different entity types without hardcoding field paths. This pattern is reusable for any configuration sanitization task where sensitive values must be masked before sharing.

file: sanitize/sanitize.go ↗ | tags: #reflection #sanitization #data-masking

Orchestrates version conversion pipelines for Kong declarative configs (e.g., 2.8→3.4, 3.4→3.10, 3.10→3.14). Uses embedded rulesets (JSON Schema-based linting rules) to validate and transform plugin configs, route fields, and service definitions. The ruleset pattern with `given`, `message`, `severity`, and `then` functions is a reusable validation framework that can be applied to any config migration scenario.

file: convert/convert.go ↗ | tags: #version-migration #rules-engine #config-transformation

Implements a Director-based builder pattern to convert Kong declarative state into Kubernetes Ingress Controller manifests (KongIngress, KongClusterPlugin, Secrets, etc.). Supports both v2/v3 Gateway API and Ingress API outputs. The builder abstraction allows adding new output formats without modifying core conversion logic, making it reusable for generating any Kubernetes resources from a declarative state.

file: kong2kic/builder.go ↗ | tags: #builder-pattern #kubernetes #manifest-generation

Implements a builder pattern to generate Terraform HCL resources for Konnect Gateway entities (services, routes, plugins, consumers, etc.). Uses formulaic generation with `generateResource`, `generateRelationship`, `outputHash`, and `outputList` functions. The pattern is reusable for converting any structured configuration into Terraform resource blocks, with support for imports and relationship references.

file: kong2tf/builder.go ↗ | tags: #builder-pattern #terraform #hcl-generation
Last analyzed: 2026-09-22 04:27:39.065322
Next check: 2026-09-29 04:27:39.065897
$ submit: