Hi guys!
We are currently in r&d about implementing an API gateway and Kong was the choice. We are using kong gateway oss.
Here’s the scenario:
We deployed the Kong in production, then in our dev environment we added new service, routes and plug-ins.
Questions:
Is there a way to import the new service (with its route and plug-ins) and to export it on production without using the ‘deck gateway sync’ way? or without using manual curl?
@dvqrbn Using deck is the most common way of managing Gateway configuration with Kong in traditional mode. deck provides you a simple declarative configuration based approach which aids greatly in moving configurations between environments. Additionally, deck provides other benefits including tools for deploying “APIOps” style management of configurations. As Mark said, if there are specific reasons you cannot you deck, please let us know.
Hi Mark, I think it will be prone to error since its manual approach.
Let’s say I have deployed in production, so every time I have to deploy new service with plugins, this is what I think will be the steps:
deck dump the prod yaml.
deck dump the dev yaml then get the new sections needed.
copy and paste it on dumped prod yaml
deck diff both yaml
deck sync.
Step 3 is crucial and need to focus for human error.
By utilizing tags within the deck configuration file, the configuration can be divided across multiple files, eliminating the need for copying and pasting all configurations into a single file.
Hey Mark, I think this helped! I created an end-to-end service with tag just as you said, then just sync that file to deployed yaml.
However, I have a problem when using the merge approach: deck file merge httpbin.yaml another-httpbin.yaml --output-file merged-kong.yaml
When I’m syncing the merged yaml it returned error regarding the consumer: Create consumer consumername failed: HTTP status 409 (message: "UNIQUE violation detected on '{username=\"consname\"}'")