Out of the box, decK supports the conversion of OpenAPI specifications to the decK declarative format, supporting an API-first workflow. Furthermore, decK supports various commands to enable APIOps-based pipelines within your CI/CD systems. Gateway configuration generation, transformations, and linting are all supported directly in the command line tool. These commands can be assembled together allowing you to construct very custom API specification and gateway configuration delivery pipelines.
The Kong Gateway declarative configuration assets naturally fit within version control systems and the APIOps capabilities of decK are designed to work directly in CI/CD systems supporting automated APIOps-based systems.
The decK documentation has more details on enabling these APIOps capabilities.
6. Continuously reconcile the desired and actual states of your API gateway configuration
In addition to API specification and Kong Gateway configuration management, decK provides the ability to directly manage the state of the gateway from those configuration files. This allows users to build a full lifecycle APIOps workflow that spans API specification construction all the way to delivery. Ensuring that the state of the gateway matches the intended configuration is key to building a robust API gateway layer. Let’s see how decK can help with this final principle.
Calculating a diff from the decK configuration file with the current state of the gateway is a single command.
Pairing this command with widely available CI systems allows you to build a workflow to act upon those calculated differences in code review style development processes. Below is a snippet from an example GitHub Actions workflow that will calculate a Kong Gateway runtime diff and post the result as the description in a new PR along with the configuration changes that would create the changes.
The full file listing can be found in the KongAir example application project.
This PR workflow can be paired with a subsequent command that will synchronize the changes when the PR is approved. The Kong Gateway configuration can be easily synchronized by using the sync command.
Adding this command to another GitHub action can automate the final delivery step of the API configuration.
The full listing is available in this KongAir example.
Conclusion
A solid APIOps process will be key to your organization's success around API delivery. Following the principles outlined in the Automating API Delivery book sets a strong foundation for your engineering success.
Kong provides the necessary tools to technically achieve these results with Kong Konnect and APIOps. Follow the Getting Started Guide for Kong Konnect and be up and running with your first API in under 10 minutes. To learn more about APIOps, check out the on-demand webinar Harnessing AI for Rapid API Delivery.