/deck

decK: Declarative configuration for Kong

Primary LanguageGoApache License 2.0Apache-2.0

decK: Declarative configuration for Kong

decK is a CLI tool to configure Kong declaratively using a single config file.

WARNING:

This is a forked version of the original decK repo and it is not being mantained. Please, refer to [hbagdi/decK] for new releases and bugfixes.

Build Status

asciicast

Table of Content

Features

  • Export
    Exisitng Kong configuration to a YAML configuration file This can be used to backup Kong's configuration.
  • Import
    Kong's database can be populated using the exported or a hand written config file.
  • Diff and sync capabilities
    decK can diff the configuration in the config file and the configuration in Kong's DB and then sync it as well. This can be used to detect config drifts or manual interventions.
  • Reverse sync:
    decK supports a sync the other way as well, meaning if an entity is created in Kong and doesn't add it to the config file, decK will detect the change.
  • Reset
    This can be used to drops all entities in Kong's DB.
  • Parallel operations
    All Admin API calls to Kong are executed in parallel using threads to speed up the sync.
  • Supported entities
    • Routes and services
    • Upstreams and targets
    • Certificates and SNIs
    • Consumers
    • Plugins (Global, per route, per service and per consumer)
  • Authentication with Kong Custom HTTP headers can be injected in requests to Kong's Admin API for authentication/authorization purposes.
  • Manage Kong's config with multiple config file Split your Kong's configuration into multiple logical files based on a shared set of tags amongst entities.

Compatibility

decK is compatible with Kong 1.x.

The YAML file generated by decK dump is compatible with Kong 1.1 declarative configuration, which can be use for DB-less deployments. Add the following line at to the YAML file and everything should work:

_format_version: "1.1"

Installation

If you are on macOS, install decK using brew:

$ brew tap alpiquero/deck
$ brew install deck

If you are Linux, you can either use the Debian or RPM archive from the Github release page or install by downloading the binary:

$ curl -sL https://github.com/alpiquero/deck/releases/download/v0.4.0/deck_0.4.0_linux_amd64.tar.gz -o deck.tar.gz
$ tar -xf deck.tar.gz -C /tmp
$ cp /tmp/deck /usr/local/bin/

Docker image

docker pull alpiquero/deck

Roadmap

Please see issues section for upcoming release milestones and features requests.

License

decK is licensed with Apache License Version 2.0. Please read the LICENSE file for more details.