Update nginx controller

This commit is contained in:
Manuel de Brito Fontes 2017-07-16 15:17:21 -04:00 committed by Minhan Xia
parent fbb96f4c83
commit 294ecb4986
2 changed files with 33 additions and 33 deletions

View file

@ -34,7 +34,7 @@ import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
proxyproto "github.com/armon/go-proxyproto" proxyproto "github.com/armon/go-proxyproto"
api_v1 "k8s.io/client-go/pkg/api/v1" api_v1 "k8s.io/api/core/v1"
"k8s.io/ingress/controllers/nginx/pkg/config" "k8s.io/ingress/controllers/nginx/pkg/config"
ngx_template "k8s.io/ingress/controllers/nginx/pkg/template" ngx_template "k8s.io/ingress/controllers/nginx/pkg/template"

View file

@ -335,39 +335,39 @@ func NewDefault() Configuration {
HTTP2MaxFieldSize: "4k", HTTP2MaxFieldSize: "4k",
HTTP2MaxHeaderSize: "16k", HTTP2MaxHeaderSize: "16k",
HSTS: true, HSTS: true,
HSTSIncludeSubdomains: true, HSTSIncludeSubdomains: true,
HSTSMaxAge: hstsMaxAge, HSTSMaxAge: hstsMaxAge,
HSTSPreload: false, HSTSPreload: false,
IgnoreInvalidHeaders: true, IgnoreInvalidHeaders: true,
GzipTypes: gzipTypes, GzipTypes: gzipTypes,
KeepAlive: 75, KeepAlive: 75,
KeepAliveRequests: 100, KeepAliveRequests: 100,
LargeClientHeaderBuffers: "4 8k", LargeClientHeaderBuffers: "4 8k",
LogFormatEscapeJSON: false, LogFormatEscapeJSON: false,
LogFormatStream: logFormatStream, LogFormatStream: logFormatStream,
LogFormatUpstream: logFormatUpstream, LogFormatUpstream: logFormatUpstream,
MaxWorkerConnections: 16384, MaxWorkerConnections: 16384,
MapHashBucketSize: 64, MapHashBucketSize: 64,
ProxyRealIPCIDR: defIPCIDR, ProxyRealIPCIDR: defIPCIDR,
ServerNameHashMaxSize: 1024, ServerNameHashMaxSize: 1024,
ProxyHeadersHashMaxSize: 512, ProxyHeadersHashMaxSize: 512,
ProxyHeadersHashBucketSize: 64, ProxyHeadersHashBucketSize: 64,
ShowServerTokens: true, ShowServerTokens: true,
SSLBufferSize: sslBufferSize, SSLBufferSize: sslBufferSize,
SSLCiphers: sslCiphers, SSLCiphers: sslCiphers,
SSLECDHCurve: "secp384r1", SSLECDHCurve: "secp384r1",
SSLProtocols: sslProtocols, SSLProtocols: sslProtocols,
SSLSessionCache: true, SSLSessionCache: true,
SSLSessionCacheSize: sslSessionCacheSize, SSLSessionCacheSize: sslSessionCacheSize,
SSLSessionTickets: true, SSLSessionTickets: true,
SSLSessionTimeout: sslSessionTimeout, SSLSessionTimeout: sslSessionTimeout,
UseGzip: true, UseGzip: true,
WorkerProcesses: strconv.Itoa(runtime.NumCPU()), WorkerProcesses: strconv.Itoa(runtime.NumCPU()),
LoadBalanceAlgorithm: defaultLoadBalancerAlgorithm, LoadBalanceAlgorithm: defaultLoadBalancerAlgorithm,
VtsStatusZoneSize: "10m", VtsStatusZoneSize: "10m",
VariablesHashBucketSize: 64, VariablesHashBucketSize: 64,
VariablesHashMaxSize: 2048, VariablesHashMaxSize: 2048,
UseHTTP2: true, UseHTTP2: true,
Backend: defaults.Backend{ Backend: defaults.Backend{
ProxyBodySize: bodySize, ProxyBodySize: bodySize,
ProxyConnectTimeout: 5, ProxyConnectTimeout: 5,