Skip to content

Instantly share code, notes, and snippets.

@toopay
Last active September 1, 2020 09:44
Show Gist options
  • Select an option

  • Save toopay/a3d9892db38f1eed10a80c196e2da31c to your computer and use it in GitHub Desktop.

Select an option

Save toopay/a3d9892db38f1eed10a80c196e2da31c to your computer and use it in GitHub Desktop.
Kongfig Schema

Overview

Kongfig allow declarative configuration. We can define our list of APIs and consumers in json/yaml and then run kongfig to ensure that our Kong is configured correctly. At the simplest form, your config.yml can be just :

---
  apis:
    -
      name: "mockbin"
      attributes:
        upstream_url: "http://mockbin.com/"
        request_host: "mockbin.com"

Schema Reference

There are 4 top level keys available :

Key Description
apis List all of your micros APIs
consumers List of required consumers
host Kong Admin API Host
headers List of custom headers to be included with every request made by Kongfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment