Versions in this module Expand all Collapse all v1 v1.5.7 Oct 25, 2019 v1.5.6 Sep 25, 2019 v1.5.5 Sep 4, 2019 v1.5.4 Aug 21, 2019 v1.5.3 Aug 7, 2019 v1.5.2 Jul 31, 2019 v1.5.1 Jul 3, 2019 v1.5.0 May 16, 2019 Changes in this version + const JWKSecretFileMode + type FakeManager struct + func NewFakeManager(confPath string) *FakeManager + func (*FakeManager) CreateConfig(name string, content []byte) + func (*FakeManager) CreateMainConfig(content []byte) + func (*FakeManager) DeleteConfig(name string) + func (*FakeManager) DeleteSecret(name string) + func (*FakeManager) Quit() + func (*FakeManager) Reload() error + func (*FakeManager) SetPlusClients(plusClient *client.NginxClient, plusConfigVersionCheckClient *http.Client) + func (*FakeManager) Start(done chan error) + func (*FakeManager) UpdateConfigVersionFile() + func (*FakeManager) UpdateServersInPlus(upstream string, servers []string, config ServerConfig) error + func (fm *FakeManager) CreateDHParam(content string) (string, error) + func (fm *FakeManager) CreateSecret(name string, content []byte, mode os.FileMode) string + func (fm *FakeManager) GetFilenameForSecret(name string) string + type LocalManager struct + func NewLocalManager(confPath string, binaryFilename string, mc collectors.ManagerCollector) *LocalManager + func (lm *LocalManager) CreateConfig(name string, content []byte) + func (lm *LocalManager) CreateDHParam(content string) (string, error) + func (lm *LocalManager) CreateMainConfig(content []byte) + func (lm *LocalManager) CreateSecret(name string, content []byte, mode os.FileMode) string + func (lm *LocalManager) DeleteConfig(name string) + func (lm *LocalManager) DeleteSecret(name string) + func (lm *LocalManager) GetFilenameForSecret(name string) string + func (lm *LocalManager) Quit() + func (lm *LocalManager) Reload() error + func (lm *LocalManager) SetPlusClients(plusClient *client.NginxClient, plusConfigVersionCheckClient *http.Client) + func (lm *LocalManager) Start(done chan error) + func (lm *LocalManager) UpdateConfigVersionFile() + func (lm *LocalManager) UpdateServersInPlus(upstream string, servers []string, config ServerConfig) error + type Manager interface + CreateConfig func(name string, content []byte) + CreateDHParam func(content string) (string, error) + CreateMainConfig func(content []byte) + CreateSecret func(name string, content []byte, mode os.FileMode) string + DeleteConfig func(name string) + DeleteSecret func(name string) + GetFilenameForSecret func(name string) string + Quit func() + Reload func() error + SetPlusClients func(plusClient *client.NginxClient, plusConfigVersionCheckClient *http.Client) + Start func(done chan error) + UpdateConfigVersionFile func() + UpdateServersInPlus func(upstream string, servers []string, config ServerConfig) error + type ServerConfig struct + FailTimeout string + MaxFails int + SlowStart string v1.4.6 Apr 11, 2019 v1.4.5 Mar 28, 2019 v1.4.4 Mar 14, 2019 v1.4.3 Jan 4, 2019 v1.4.2 Dec 12, 2018 v1.4.1 Nov 28, 2018 v1.4.0 Nov 14, 2018 Changes in this version + const DefaultServerSecretName + const JWK + const JWTKeyAnnotation + const JWTKeyKey + const TLS + const TLSSecretFileMode + func GenerateCertAndKeyFileContent(secret *api_v1.Secret) []byte + func GetMapKeyAsBool(m map[string]string, key string, context apiObject) (bool, bool, error) + func GetMapKeyAsInt(m map[string]string, key string, context apiObject) (int, bool, error) + func GetMapKeyAsInt64(m map[string]string, key string, context apiObject) (int64, bool, error) + func GetMapKeyAsStringSlice(m map[string]string, key string, context apiObject, delimiter string) ([]string, bool, error) + func GetSecretKind(secret *api_v1.Secret) (int, error) + func ParseLBMethod(method string) (string, error) + func ParseLBMethodForPlus(method string) (string, error) + func ParseSlowStart(s string) (string, error) + func ValidateJWKSecret(secret *api_v1.Secret) error + func ValidateTLSSecret(secret *api_v1.Secret) error + type Config struct + ClientMaxBodySize string + FailTimeout string + HSTS bool + HSTSIncludeSubdomains bool + HSTSMaxAge int64 + HTTP2 bool + HealthCheckEnabled bool + HealthCheckMandatory bool + HealthCheckMandatoryQueue int64 + IngressTemplate *string + JWTKey string + JWTLoginURL string + JWTRealm string + JWTToken string + Keepalive int64 + LBMethod string + LocationSnippets []string + MainErrorLogLevel string + MainHTTPSnippets []string + MainLogFormat string + MainMainSnippets []string + MainServerNamesHashBucketSize string + MainServerNamesHashMaxSize string + MainServerSSLCiphers string + MainServerSSLDHParam string + MainServerSSLDHParamFileContent *string + MainServerSSLPreferServerCiphers bool + MainServerSSLProtocols string + MainStreamLogFormat string + MainStreamSnippets []string + MainTemplate *string + MainWorkerCPUAffinity string + MainWorkerConnections string + MainWorkerProcesses string + MainWorkerRlimitNofile string + MainWorkerShutdownTimeout string + MaxFails int + Ports []int + ProxyBufferSize string + ProxyBuffering bool + ProxyBuffers string + ProxyConnectTimeout string + ProxyHideHeaders []string + ProxyMaxTempFileSize string + ProxyPassHeaders []string + ProxyProtocol bool + ProxyReadTimeout string + RealIPHeader string + RealIPRecursive bool + RedirectToHTTPS bool + SSLPorts []int + SSLRedirect bool + ServerSnippets []string + ServerTokens string + SetRealIPFrom []string + SlowStart string + func NewDefaultConfig() *Config + func ParseConfigMap(cfgm *api_v1.ConfigMap, nginxPlus bool) *Config + type Configurator struct + func NewConfigurator(nginx *Controller, config *Config, nginxAPI *plus.NginxAPIController, ...) *Configurator + func (cnf *Configurator) AddOrUpdateDHParam(content string) (string, error) + func (cnf *Configurator) AddOrUpdateDefaultServerTLSSecret(secret *api_v1.Secret) error + func (cnf *Configurator) AddOrUpdateIngress(ingEx *IngressEx) error + func (cnf *Configurator) AddOrUpdateMergeableIngress(mergeableIngs *MergeableIngresses) error + func (cnf *Configurator) AddOrUpdateSecret(secret *api_v1.Secret, ingExes []IngressEx, ...) error + func (cnf *Configurator) DeleteIngress(key string) error + func (cnf *Configurator) DeleteSecret(key string, ingExes []IngressEx, mergeableIngresses []MergeableIngresses) error + func (cnf *Configurator) HasIngress(ing *extensions.Ingress) bool + func (cnf *Configurator) HasMinion(master *extensions.Ingress, minion *extensions.Ingress) bool + func (cnf *Configurator) UpdateConfig(config *Config, ingExes []*IngressEx, ...) error + func (cnf *Configurator) UpdateEndpoints(ingExes []*IngressEx) error + func (cnf *Configurator) UpdateEndpointsMergeableIngress(mergableIngressesSlice []*MergeableIngresses) error + type Controller struct + func NewNginxController(nginxConfPath string, nginxBinaryPath string, local bool) *Controller + func (nginx *Controller) AddOrUpdateDHParam(dhparam string) (string, error) + func (nginx *Controller) AddOrUpdateSecretFile(name string, content []byte, mode os.FileMode) string + func (nginx *Controller) DeleteIngress(name string) + func (nginx *Controller) DeleteSecretFile(name string) + func (nginx *Controller) Quit() + func (nginx *Controller) Reload() error + func (nginx *Controller) Start(done chan error) + func (nginx *Controller) UpdateConfigVersionFile() + func (nginx *Controller) UpdateIngressConfigFile(name string, cfg []byte) + func (nginx *Controller) UpdateMainConfigFile(cfg []byte) + type HealthCheck struct + Fails int32 + Headers map[string]string + Interval int32 + Mandatory bool + Passes int32 + Scheme string + TimeoutSeconds int64 + URI string + UpstreamName string + type Ingress struct + Annotations map[string]string + Name string + Namespace string + type IngressEx struct + Endpoints map[string][]string + HealthChecks map[string]*api_v1.Probe + Ingress *extensions.Ingress + JWTKey JWTKey + TLSSecrets map[string]*api_v1.Secret + func (ingEx *IngressEx) String() string + type IngressNginxConfig struct + Ingress Ingress + Keepalive string + Servers []Server + Upstreams []Upstream + type JWTAuth struct + Key string + Realm string + RedirectLocationName string + Token string + type JWTKey struct + Name string + Secret *api_v1.Secret + type JWTRedirectLocation struct + LoginURL string + Name string + type Location struct + ClientMaxBodySize string + GRPC bool + JWTAuth *JWTAuth + LocationSnippets []string + MinionIngress *Ingress + Path string + ProxyBufferSize string + ProxyBuffering bool + ProxyBuffers string + ProxyConnectTimeout string + ProxyMaxTempFileSize string + ProxyReadTimeout string + Rewrite string + SSL bool + Upstream Upstream + Websocket bool + type MainConfig struct + ErrorLogLevel string + HTTP2 bool + HTTPSnippets []string + HealthStatus bool + LogFormat string + MainSnippets []string + NginxStatus bool + NginxStatusAllowCIDRs []string + NginxStatusPort int + ProxyProtocol bool + SSLCiphers string + SSLDHParam string + SSLPreferServerCiphers bool + SSLProtocols string + ServerNamesHashBucketSize string + ServerNamesHashMaxSize string + ServerTokens string + StreamLogFormat string + StreamSnippets []string + WorkerCPUAffinity string + WorkerConnections string + WorkerProcesses string + WorkerRlimitNofile string + WorkerShutdownTimeout string + func GenerateNginxMainConfig(config *Config) *MainConfig + type MergeableIngresses struct + Master *IngressEx + Minions []*IngressEx + type Server struct + GRPCOnly bool + HSTS bool + HSTSIncludeSubdomains bool + HSTSMaxAge int64 + HTTP2 bool + HealthChecks map[string]HealthCheck + JWTAuth *JWTAuth + JWTRedirectLocations []JWTRedirectLocation + Locations []Location + Name string + Ports []int + ProxyHideHeaders []string + ProxyPassHeaders []string + ProxyProtocol bool + RealIPHeader string + RealIPRecursive bool + RedirectToHTTPS bool + SSL bool + SSLCertificate string + SSLCertificateKey string + SSLCiphers string + SSLPorts []int + SSLRedirect bool + ServerSnippets []string + ServerTokens string + SetRealIPFrom []string + StatusZone string + type TemplateExecutor struct + HealthStatus bool + NginxStatus bool + NginxStatusAllowCIDRs []string + NginxStatusPort int + func NewTemplateExecutor(mainTemplatePath string, ingressTemplatePath string, healthStatus bool, ...) (*TemplateExecutor, error) + func (te *TemplateExecutor) ExecuteIngressConfigTemplate(cfg *IngressNginxConfig) ([]byte, error) + func (te *TemplateExecutor) ExecuteMainConfigTemplate(cfg *MainConfig) ([]byte, error) + func (te *TemplateExecutor) UpdateIngressTemplate(templateString *string) error + func (te *TemplateExecutor) UpdateMainTemplate(templateString *string) error + type Upstream struct + LBMethod string + Name string + Queue int64 + QueueTimeout int64 + StickyCookie string + UpstreamServers []UpstreamServer + func NewUpstreamWithDefaultServer(name string) Upstream + type UpstreamServer struct + Address string + FailTimeout string + MaxFails int + Port string + SlowStart string