Annotations for the InfluxDB Module

Signed-off-by: Lorenzo Fontana <lo@linux.com>
This commit is contained in:
Lorenzo Fontana 2018-05-17 14:25:38 +02:00
parent aa256ac887
commit 93be8db612
No known key found for this signature in database
GPG key ID: 0D48B0B074C3DC15
10 changed files with 256 additions and 1 deletions

View file

@ -516,6 +516,11 @@ type Configuration struct {
// DisableLuaRestyWAF disables lua-resty-waf globally regardless
// of whether there's an ingress that has enabled the WAF using annotation
DisableLuaRestyWAF bool `json:"disable-lua-resty-waf"`
// EnableInfluxDB enables the nginx InfluxDB extension
// http://github.com/influxdata/nginx-influxdb-module/
// By default this is disabled
EnableInfluxDB bool `json:"enable-influxdb"`
}
// NewDefault returns the default nginx configuration

View file

@ -450,6 +450,7 @@ func (n *NGINXController) getBackendServers(ingresses []*extensions.Ingress) ([]
loc.Logs = anns.Logs
loc.GRPC = anns.GRPC
loc.LuaRestyWAF = anns.LuaRestyWAF
loc.InfluxDB = anns.InfluxDB
if loc.Redirect.FromToWWW {
server.RedirectFromToWWW = true
@ -486,6 +487,7 @@ func (n *NGINXController) getBackendServers(ingresses []*extensions.Ingress) ([]
Logs: anns.Logs,
GRPC: anns.GRPC,
LuaRestyWAF: anns.LuaRestyWAF,
InfluxDB: anns.InfluxDB,
}
if loc.Redirect.FromToWWW {
@ -922,6 +924,7 @@ func (n *NGINXController) createServers(data []*extensions.Ingress,
defLoc.Denied = anns.Denied
defLoc.GRPC = anns.GRPC
defLoc.LuaRestyWAF = anns.LuaRestyWAF
defLoc.InfluxDB = anns.InfluxDB
}
}
}