Merge pull request #246 from aledbf/set-headers

Add support for custom proxy headers using a ConfigMap
This commit is contained in:
Manuel Alejandro de Brito Fontes 2017-02-16 07:35:57 -03:00 committed by GitHub
commit b5819d8f4d
11 changed files with 254 additions and 2 deletions

View file

@ -156,6 +156,9 @@ type Configuration struct {
// of your external load balancer
ProxyRealIPCIDR string `json:"proxy-real-ip-cidr,omitempty"`
// Sets the name of the configmap that contains the headers to pass to the backend
ProxySetHeaders string `json:"proxy-set-headers,omitempty"`
// Maximum size of the server names hash tables used in server names, map directives values,
// MIME types, names of request header strings, etcd.
// http://nginx.org/en/docs/hash.html
@ -288,6 +291,7 @@ func NewDefault() Configuration {
// TemplateConfig contains the nginx configuration to render the file nginx.conf
type TemplateConfig struct {
ProxySetHeaders map[string]string
MaxOpenFiles int
BacklogSize int
Backends []*ingress.Backend