Skip to content

Latest commit

 

History

History

README.md

Kong API Gateway Samples

This directory contains sample configurations for Kong Gateway in the HelpDev platform.

Overview

Kong is deployed in DB-less mode using declarative YAML configuration managed via GitOps.

Files

File Description
routes.yaml Sample service routes configuration
plugins.yaml Sample service plugins configuration
kong-aggregated.yaml Sample aggregated Kong config (auto-generated)
values-internal.yaml Helm values for internal Kong (ClusterIP)
values-external.yaml Helm values for external Kong (LoadBalancer)

Repository Structure

platform-kong (Infrastructure)

platform-kong/{account}/{env}/{region}/{kong-instance}/
├── values.yaml          # Helm values
└── kustomization.yaml   # Kustomize overlay

platform-apis (Configuration)

platform-apis/{account}/{env}/{region}/{kong-instance}/{service}/
├── openapi.yaml    # API specification
├── routes.yaml     # Kong routes
├── plugins.yaml    # Kong plugins
└── metadata.yaml   # Auto-generated metadata

Kong Instance Types

Type Purpose Network
Internal Service-to-service ClusterIP
External Public APIs LoadBalancer + WAF

Usage

1. Create Kong Instance via Backstage

Use the "Create Kong API Gateway Instance" template in Backstage.

2. Associate Service with Kong

Add annotations to your service's catalog-info.yaml:

metadata:
  annotations:
    helpdev.io/kong-instance: ecommerce-external
    helpdev.io/kong-type: external
    helpdev.io/openapi-path: apis/openapi.yaml
    helpdev.io/openapi-auto-publish: "true"

3. Pipeline Integration

The pipeline will automatically:

  1. Validate OpenAPI spec
  2. Publish to platform-apis
  3. Trigger Kong config aggregation
  4. ArgoCD syncs to Kong

Documentation