GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - erran/kong-datadog-k8s: A fork of the bundled datadog plugin which supports passing host as an environment variable

BranchesTags
Open more actions menu

Latest commit

 

History

19 Commits
19 Commits

Folders and files

NameName
Last commit message
Last commit date
declarative-config
declarative-config
 
 
src/kong/plugins/datadog-k8s
src/kong/plugins/datadog-k8s
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
kong-datadog-k8s-2.3.0-0.rockspec
kong-datadog-k8s-2.3.0-0.rockspec
 
 

Repository files navigation

kong-datadog-k8s

A fork of the bundled datadog plugin which supports passing host as an environment variable.

A list of version can be found at http://luarocks.org/modules/erran/kong-datadog-k8s. The semantic version number of the LuaRock matches the version of Kong that was forked to create this plugin.

Developing

Build the docker image locally (you can use the .dev variant if you'd like to validate local changes).

docker build -f Dockerfile \
  --build-arg PLUGIN_ROCK_VERSION=2.3.0-0 \
  -t kong-k8s:2.3.0 .

Run kong locally:

docker run --name kong-k8s \
  -p 8000-8001:8000-8001 \
  -e KONG_DATABASE=off \
  -e KONG_PROXY_ACCESS_LOG=/dev/stdout \
  -e KONG_ADMIN_ACCESS_LOG=/dev/stdout \
  -e KONG_PROXY_ERROR_LOG=/dev/stderr \
  -e KONG_ADMIN_ERROR_LOG=/dev/stderr \
  -e KONG_ADMIN_LISTEN=0.0.0.0:8001 \
  -v $(pwd)/declarative-config:/usr/local/kong/declarative \
  -e KONG_DECLARATIVE_CONFIG=/usr/local/kong/declarative/kong.yml \
  -e KONG_PLUGINS=bundled,datadog-k8s \
  -e KONG_NGINX_MAIN_ENV=KONG_DATADOG_K8S_HOST \
  -e KONG_DATADOG_K8S_HOST=docker.for.mac.localhost \
  -e KONG_NGINX_EVENTS_MULTI_ACCEPT=off kong-k8s:2.3.0

Call Services/Routes defined in [./declarative-config][] to verify the plugin:

http localhost:8000/example

Verify the [mock] dd agent receives requests

docker logs

To verify custom environment variable names you must:

  1. Inject the env Nginx directive in your container environment (e.g. -e KONG_NGINX_MAIN_ENV=KONG_DATADOG_K8S_HOST).
  2. Overwrite the config.host_from_env option to match this value.

If you must support more than one environment variable being exposed to worker processes you'll need to use a custom nginx template as documented by Kong and demonstrated in the 0.14.x branch of this project.

About

A fork of the bundled datadog plugin which supports passing host as an environment variable

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.