Skip to content

Feat: Add 'generate` subcommand #486

@rspurgeon

Description

@rspurgeon

Generate API Management files

This feature captures the idea of using kongctl to bootstrap kongctl declarative management files and GitHub Action workflows into a local folder / git repo. Well know Konnect resource configurations and GH workflows will be packaged into the kongctl binary (or potentially downloaded on demand) and written to disk into a target folder (the current project folder by default).

The following is a broad set of ideas we can pull from to support helping users bring APIOps to their projects that work with Konnect

  • Allow for both a "wizard" style dialog as well as full one-shot command with flags and arguments to create the workflow file(s).
  • Generate a kongctl lint workflow that validates Kong API Gateway deck files
  • Generate a kongctl lint workflow that validates OpenAPI Specification files
  • Generate a kongctl sync workflow. Options on this workflow should: 1) use apply instead. 2) Stage plan into a PR or write to Konnect directly
  • Support combining deck and kongctl into single workflows
  • Support the setup actions for both kongctl and deck
  • Support generating a base set of Konnect resources for an API Management flow. Given a user providing an OpenAPI spec path, setup a flow that uses it to bootstrap the entire set of resources
  • kongctl generate declarative api --spec <input-oas.yaml>
  • Support generating all workflows in a single command
  • Help the user store the Konnect Token into the appropriate GH Secret value

https://github.com/github/gh-aw is an inspiration for form based inputs, GH configuration support, and workflow generation (compile in that library).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmedium-priorityThis item should be addressed in the medium term time frametriagedThis item has been triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions