Skip to content
2023 API Summit Hackathon: Experiment with AI for APIs (August 28 - September 27) Learn More →
Kong Logo | Kong Docs Logo
search
  • We're Hiring!
  • Docs
    • Kong Gateway
      Lightweight, fast, and flexible cloud-native API gateway
      Kong Konnect
      Single platform for SaaS end-to-end connectivity
      Kong Mesh
      Enterprise service mesh based on Kuma and Envoy
      decK
      Helps manage Kong’s configuration in a declarative fashion
      Kong Ingress Controller
      Works inside a Kubernetes cluster and configures Kong to proxy traffic
      Insomnia
      Collaborative API development platform
      Kuma
      Open-source distributed control plane with a bundled Envoy Proxy integration
      Docs Contribution Guidelines
      Want to help out, or found an issue in the docs and want to let us know?
  • API Specs
  • Plugin Hub
    • Explore the Plugin Hub
      View all plugins View all plugins View all plugins arrow image
    • Functionality View all View all arrow image
      View all plugins
      Authentication's icon
      Authentication
      Protect your services with an authentication layer
      Security's icon
      Security
      Protect your services with additional security layer
      Traffic Control's icon
      Traffic Control
      Manage, throttle and restrict inbound and outbound API traffic
      Serverless's icon
      Serverless
      Invoke serverless functions in combination with other plugins
      Analytics & Monitoring's icon
      Analytics & Monitoring
      Visualize, inspect and monitor APIs and microservices traffic
      Transformations's icon
      Transformations
      Transform request and responses on the fly on Kong
      Logging's icon
      Logging
      Log request and response data using the best transport for your infrastructure
  • Support
  • Community
  • Kong Academy
Get a Demo Start Free Trial
Contribution guidelines
  • Home icon
  • Style guide and contribution guidelines
  • Single-sourced plugins
github-edit-pageEdit this page
report-issueReport an issue
  • Kong Gateway
  • Kong Konnect
  • Kong Mesh
  • Plugin Hub
  • decK
  • Kong Ingress Controller
  • Insomnia
  • Kuma

  • Docs contribution guidelines
enterprise-switcher-icon Switch to OSS
On this pageOn this page
  • Automatic plugin versioning
  • Open source and enterprise discrepancies
  • See also

Single-sourced plugins

We use a Jekyll plugin (plugin_single_source_generator.rb) to dynamically generate pages from a single source file.

Here’s how it works:

  1. Read all version files (app/_hub/**/versions.yml).
  2. For each version listed in the file, check if app/_hub/[vendor]/[name]/[version].md exists.
  3. If not, read app/_hub/[vendor]/[name]/_index.md and generate a version of the page.
  4. The latest version is always generated as index.html, while older versions are generated as [version].html.

Automatic plugin versioning

Each versions.yml is expected to contain a strategy and a list of releases:

strategy: gateway
releases:
  minimum_version: '2.1.x'
  maximum_version: '3.0.x' # optional

Which reads all available Gateway versions from kong_versions.yml and selects those that are in the specified range.

Note: Although strategy supports either matrix for the original rendering, or gateway for plugins that have versions pinned to the Gateway version, the matrix option is no longer in use. It remains at the moment for backwards compatibility.

This can also be used with overrides to set a custom plugin version name:

strategy: gateway
releases:
  minimum_version: '2.1.x'
overrides:
  2.8.x: 0.13.x
  2.7.x: 0.12.x

Open source and enterprise discrepancies

In some cases, the version of a plugin is different between the Community Edition (OSS) and Enterprise Edition. In these instances, each release should be entered as a unique version in the config file.

Here’s an example where Gateway 2.3.x CE uses plugin version 1.0, while 2.3.x EE uses plugin version 2.0:

strategy: gateway
releases:
  minimum_version: 2.2.x
replacements:
  2.3.x:
    - 2.3.x-CE
    - 2.3.x-EE
sources:
  2.2.x-CE: _1.0
  2.2.x: _1.0
overrides:
  2.4.x: 2.0.x
  2.3.x-EE: 2.0.x
  2.3.x-CE: 1.0.x
  2.2.x: 1.0.x

2.3.x-EE and 2.4.x both use plugin version 2.0.x and the default _index source file. 2.3.x-CE and 2.2.x use plugin version 1.0.x and the _1.0 source file.

If you want to use releases but have one or two versions that you need to override, you can use replacements:

strategy: gateway
releases:
  minimum_version: '2.1.x'
replacements:
  2.3.x:
    - 2.3.x-CE
    - 2.3.x-EE
sources:
  2.3.x-CE: _foo
overrides:
  2.3.x-EE: 2.0.x
  2.3.x-CE: 1.0.x

See also

  • Conditional rendering: Render content in a file based on version filters
  • Single-sourced versions: Learn about how single sourcing is implemented for other Kong products
Thank you for your feedback.
Was this page useful?
Too much on your plate? close cta icon
More features, less infrastructure with Kong Konnect. 1M requests per month for free.
Try it for Free
  • Kong
    THE CLOUD CONNECTIVITY COMPANY

    Kong powers reliable digital connections across APIs, hybrid and multi-cloud environments.

    • Company
    • Customers
    • Events
    • Investors
    • Careers Hiring!
    • Partners
    • Press
    • Contact
  • Products
    • Kong Konnect
    • Kong Gateway
    • Kong Mesh
    • Get Started
    • Pricing
  • Resources
    • eBooks
    • Webinars
    • Briefs
    • Blog
    • API Gateway
    • Microservices
  • Open Source
    • Install Kong Gateway
    • Kong Community
    • Kubernetes Ingress
    • Kuma
    • Insomnia
  • Solutions
    • Decentralize
    • Secure & Govern
    • Create a Dev Platform
    • API Gateway
    • Kubernetes
    • Service Mesh
Star
  • Terms•Privacy
© Kong Inc. 2023