koli / kong-ingress

[DEPRECATED] A Kubernetes Ingress for Kong
Other
93 stars 14 forks source link

Global configuration for API defaults #27

Open sandromello opened 6 years ago

sandromello commented 6 years ago

The ingress deals with new routes providing only the required fields. To change an API configuration of a route it's a manual process. The Pull Request #24 introduces a way of configuring the strip_uri attribute using an ingress annotation.

Instead of specifying an annotation for each ingress resource, I propose a global configuration for defining default values for API routes, and annotations could be used to override those defaults.

E.g.:

Binary args

# In this example each route will be provisioned with those values
./kong-ingress --strip-uri=false --preserve-host=true --retries=10

Or environment variable configuration

STRIP_URI=false
PRESERVE_HOST=true

Reference: https://getkong.org/docs/0.11.x/admin-api/#add-api