0.0
The project is in a healthy, maintained state
A ruby gem to generate Kong configs across multiple clusters to achieve service equivalence
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.5
>= 0
~> 10.0
~> 3.0
~> 1.64
~> 1.3.1
>= 0
 Project Readme

Gojira

Gem Version

Maintaining order within the Kong realm [ref]

drawing

Documentation

This post on my blog was the starting point of it all: Gojira: Building Multi-Region APIOps with Kong

More detailed docs about the conventions of the framework are yet to follow.

Installation

Add this line to your application's Gemfile:

gem 'gojira'

And then execute:

$ bundle

Or install it yourself as:

$ gem install gojira

Usage

Top-Level Commands

commands:
  gojira cluster         # Commands interacting with Kong cluster
  gojira env             # Commands interacting with Gateway env directory
  gojira help [COMMAND]  # Describe available commands or one specific command
  gojira version         # Print Gojira gem version

Options:
  [--kong-addr=KONG_ADDR]                        # Kong Host & Port
  [--config=CONFIG]                              # decK config file
  [--ca-cert-file=CA_CERT_FILE]                  # CA Cert File
  [--tls-client-key-file=TLS_CLIENT_KEY_FILE]    # TLS Client Key file
  [--tls-client-cert-file=TLS_CLIENT_CERT_FILE]  # TLS Client Cert file
  [--tls-server-name=TLS_SERVER_NAME]            # TLS Server Name

Cluster commands

These commands are used to interact with the Kong Control Plane

Commands:
  gojira cluster diff            # diff output for kong config in a cluster
  gojira cluster dump            # takes dump of resources from a kong cluster
  gojira cluster help [COMMAND]  # Describe subcommands or one specific subcommand
  gojira cluster sync            # syncs kong config to a cluster
  gojira cluster validate        # validates kong config for a cluster

Usage:
  gojira cluster sync

Options:
  -s, [--kong-state-file=KONG_STATE_FILE]  # Kong State File
  -n, [--env-name=ENV_NAME]                # Environment identifier name
  -c, [--compliance-type=COMPLIANCE_TYPE]  # Compliance Type
                                           # Possible values: pci, non-pci
  -f, [--cluster-file=CLUSTER_FILE]        # Cluster file path
  -d, [--dc-name=DC_NAME]                  # DC Name

syncs kong config to a cluster

Env Commands

These commands are used to lint and generate configurations based on environments and tags defined a/c Gojira's opinionated conventions

Commands:
  gojira env generate        # generates kong state for the env repo
  gojira env help [COMMAND]  # Describe subcommands or one specific subcommand
  gojira env lint            # lints env repo and validates against conventions
Usage:
  gojira env generate

Options:
  -f, [--gateway-folder=GATEWAY_FOLDER]    # Gateway configs folder path
  -n, [--env-name=ENV_NAME]                # Environment identifier name
  -f, [--cluster-file=CLUSTER_FILE]        # Path to Cluster definition file
  -c, [--compliance-type=COMPLIANCE_TYPE]  # Compliance Type(pci/non-pci)
  -d, [--dc-name=DC_NAME]                  # DC Name

generates kong state for the env repo

TODO:

  • Lint:

    • Searches through env directory
    • get list of all products/services
    • checks if their upstream info is available across all clusters of that env
    • service level validations(PCI/NPCI service tags, no route with tags)
    • Gives out errors of each validation level in JSON
  • Generate:

    • Merge product services files into one config
    • Substitute kong upstreams for respective compliance type and DC
    • Merge all product configs into one file
    • Not to interfere and merge global conf and certs, they will be passed with -s
    • Can include local config here later