Skip to content

Example project demonstrating multi space routing using Kong and network policies

License

Notifications You must be signed in to change notification settings

philips-labs/kong-multispace-routing-example

Repository files navigation

kong-multispace-route-example

This module deploys apps in different spaces while making them available from a single host through a path prefix. It demonstrates how network policies can be used to accomodate traffic across spaces and potentially even across org boundaries

Disclaimer

Important

This repository is managed as Philips Inner-source / Open-source. This repository is NOT endorsed or supported by HSSA&P or I&S Cloud Operations. You are expected to self-support or raise tickets on the Github project and NOT raise tickets in HSP ServiceNow.

how it works

Based on the teams count (var.teams) the module does the following:

  • Creates n spaces
  • Deploys a test app in each space
  • Deploys a Kong API gateway
  • Configures the API gateway to forward /teamN path to space N hosted test app
  • Sets up network policies for cross space container-to-container traffic

usage

Provide the required variables and then run:

terraform init
terraform apply

License

License is MIT

Requirements

No requirements.

Providers

Name Version
cloudfoundry 0.15.0
hsdp 0.30.10
random 3.1.0

Modules

Name Source Version
kong philips-labs/kong/cloudfoundry 3.0.0

Resources

Name Type
cloudfoundry_app.teams resource
cloudfoundry_network_policy.policies resource
cloudfoundry_route.internal resource
cloudfoundry_space.spaces resource
cloudfoundry_space_users.users resource
random_pet.deploy resource
cloudfoundry_domain.internal data source
cloudfoundry_org.org data source
hsdp_config.cf data source

Inputs

Name Description Type Default Required
cf_org_name n/a string n/a yes
cf_password n/a string n/a yes
cf_space_name n/a string n/a yes
cf_user n/a string n/a yes
region n/a string n/a yes
teams n/a number 4 no

Outputs

Name Description
api_gateway n/a

Requirements

No requirements.

Providers

Name Version
cloudfoundry 0.50.5
hsdp 0.42.1
random 3.1.0

Modules

Name Source Version
kong philips-labs/kong/cloudfoundry 3.0.0

Resources

Name Type
cloudfoundry_app.teams resource
cloudfoundry_network_policy.policies resource
cloudfoundry_route.internal resource
cloudfoundry_space.spaces resource
cloudfoundry_space_users.users resource
random_pet.deploy resource
cloudfoundry_domain.internal data source
cloudfoundry_org.org data source
hsdp_config.cf data source

Inputs

Name Description Type Default Required
cf_org_name n/a string n/a yes
cf_password n/a string n/a yes
cf_space_name n/a string n/a yes
cf_user n/a string n/a yes
region n/a string n/a yes
teams n/a number 4 no

Outputs

Name Description
api_gateway n/a

About

Example project demonstrating multi space routing using Kong and network policies

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages