Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/RyanSiu1995/dhall-kong
Dhall types definition for Kong declarative configuration file
https://github.com/RyanSiu1995/dhall-kong
Last synced: 11 days ago
JSON representation
Dhall types definition for Kong declarative configuration file
- Host: GitHub
- URL: https://github.com/RyanSiu1995/dhall-kong
- Owner: RyanSiu1995
- License: apache-2.0
- Created: 2019-04-23T07:15:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-01T09:40:51.000Z (over 5 years ago)
- Last Synced: 2024-04-17T12:02:14.854Z (7 months ago)
- Language: Makefile
- Homepage:
- Size: 20.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-dhall - dhall-kong - Dhall types definition for Kong declarative configuration file. (Libraries)
README
# Dhall - Kong
Kong API gateway starts to support a declarative configuration file in yaml format
since v1.1.x. The declarative configuration file makes the deployment on Kong more controllable
under CI/CD pipeline. This library aims at providing an interface for developers
to define a configurable configuration file for Kong.## Development Schedule
- [X] Basic objects defined in admin API
- [X] Service
- [X] Route
- [X] Consumer
- [X] Plugin
- [X] Certificate
- [X] SNI
- [X] Upstream
- [X] Target
- [ ] Support for nesting objects, which is introduced from declarative configuration## How to use
The library is developed based on the structure of [dhall-kubernetes](https://github.com/dhall-lang/dhall-kubernetes).
* [types](./types) folder contains the schema for Kong objects.
* [default](./default) folder contains the function to generate the Kong object.
* [configuration.dhall](./default/configuration.dhall) is an empty Kong declarative configuration.### Certificate and SNI
Sni and certificate in declarative configuraiton is coupled. You need to declare the list of snis before
defining the certificate as the following.
```dhall
let config = ./default/configuration.dhall
let mkSni = ./default/sni.dhall
let mkCert = ./default/certificate.dhalllet mySni: ./types/sni.dhall = mkSni "my.example.com"
let myCert: ./types/certificate.dhall = mkCert "myCert" "myKey" // { sni = Some [mySni] }in config // { certificates = Some [myCert] }
```For more example, please check the [example.dhall](./example/example.dhall) file.
## Contribution
The project is now under development. Welcome to open an issue and submit pull request
on improving the library.