Documentation
      ¶
    
    
  
    
  
    Index ¶
- type HealthCheck
 - type Ingress
 - type IngressNginxConfig
 - type JWTAuth
 - type JWTRedirectLocation
 - type Location
 - type MainConfig
 - type Server
 - type TemplateExecutor
 - 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
 - type UpstreamServer
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthCheck ¶
type HealthCheck struct {
	UpstreamName   string
	URI            string
	Interval       int32
	Fails          int32
	Passes         int32
	Scheme         string
	Mandatory      bool
	Headers        map[string]string
	TimeoutSeconds int64
}
    HealthCheck describes an active HTTP health check.
type IngressNginxConfig ¶
type IngressNginxConfig struct {
	Upstreams []Upstream
	Servers   []Server
	Keepalive string
	Ingress   Ingress
}
    IngressNginxConfig describes an NGINX configuration.
type JWTRedirectLocation ¶
JWTRedirectLocation describes a location for redirecting client requests to a login URL for JWT Authentication.
type Location ¶
type Location struct {
	LocationSnippets     []string
	Path                 string
	Upstream             Upstream
	ProxyConnectTimeout  string
	ProxyReadTimeout     string
	ProxySendTimeout     string
	ClientMaxBodySize    string
	Websocket            bool
	Rewrite              string
	SSL                  bool
	GRPC                 bool
	ProxyBuffering       bool
	ProxyBuffers         string
	ProxyBufferSize      string
	ProxyMaxTempFileSize string
	JWTAuth              *JWTAuth
	MinionIngress *Ingress
}
    Location describes an NGINX location.
type MainConfig ¶
type MainConfig struct {
	ServerNamesHashBucketSize      string
	ServerNamesHashMaxSize         string
	AccessLogOff                   bool
	LogFormat                      string
	ErrorLogLevel                  string
	StreamLogFormat                string
	HealthStatus                   bool
	HealthStatusURI                string
	NginxStatus                    bool
	NginxStatusAllowCIDRs          []string
	NginxStatusPort                int
	StubStatusOverUnixSocketForOSS bool
	MainSnippets                   []string
	HTTPSnippets                   []string
	StreamSnippets                 []string
	SSLProtocols                   string
	SSLPreferServerCiphers         bool
	SSLCiphers                     string
	SSLDHParam                     string
	HTTP2                          bool
	ServerTokens                   string
	ProxyProtocol                  bool
	WorkerProcesses                string
	WorkerCPUAffinity              string
	WorkerShutdownTimeout          string
	WorkerConnections              string
	WorkerRlimitNofile             string
	ResolverAddresses              []string
	ResolverIPV6                   bool
	ResolverValid                  string
	ResolverTimeout                string
	KeepaliveTimeout               string
	KeepaliveRequests              int64
	VariablesHashBucketSize        uint64
	VariablesHashMaxSize           uint64
	OpenTracingLoadModule          bool
	OpenTracingEnabled             bool
	OpenTracingTracer              string
	OpenTracingTracerConfig        string
}
    MainConfig describe the main NGINX configuration file.
type Server ¶
type Server struct {
	ServerSnippets        []string
	Name                  string
	ServerTokens          string
	Locations             []Location
	SSL                   bool
	SSLCertificate        string
	SSLCertificateKey     string
	SSLCiphers            string
	GRPCOnly              bool
	StatusZone            string
	HTTP2                 bool
	RedirectToHTTPS       bool
	SSLRedirect           bool
	ProxyProtocol         bool
	HSTS                  bool
	HSTSMaxAge            int64
	HSTSIncludeSubdomains bool
	HSTSBehindProxy       bool
	ProxyHideHeaders      []string
	ProxyPassHeaders      []string
	HealthChecks map[string]HealthCheck
	RealIPHeader    string
	SetRealIPFrom   []string
	RealIPRecursive bool
	JWTAuth              *JWTAuth
	JWTRedirectLocations []JWTRedirectLocation
	Ports    []int
	SSLPorts []int
}
    Server describes an NGINX server.
type TemplateExecutor ¶
type TemplateExecutor struct {
	// contains filtered or unexported fields
}
    TemplateExecutor executes NGINX configuration templates.
func NewTemplateExecutor ¶
func NewTemplateExecutor(mainTemplatePath string, ingressTemplatePath string) (*TemplateExecutor, error)
NewTemplateExecutor creates a TemplateExecutor.
func (*TemplateExecutor) ExecuteIngressConfigTemplate ¶
func (te *TemplateExecutor) ExecuteIngressConfigTemplate(cfg *IngressNginxConfig) ([]byte, error)
ExecuteIngressConfigTemplate generates the content of a NGINX configuration file for an Ingress resource.
func (*TemplateExecutor) ExecuteMainConfigTemplate ¶
func (te *TemplateExecutor) ExecuteMainConfigTemplate(cfg *MainConfig) ([]byte, error)
ExecuteMainConfigTemplate generates the content of the main NGINX configuration file.
func (*TemplateExecutor) UpdateIngressTemplate ¶
func (te *TemplateExecutor) UpdateIngressTemplate(templateString *string) error
UpdateIngressTemplate updates the ingress template.
func (*TemplateExecutor) UpdateMainTemplate ¶
func (te *TemplateExecutor) UpdateMainTemplate(templateString *string) error
UpdateMainTemplate updates the main NGINX template.
type Upstream ¶
type Upstream struct {
	Name             string
	UpstreamServers  []UpstreamServer
	StickyCookie     string
	LBMethod         string
	Queue            int64
	QueueTimeout     int64
	UpstreamZoneSize string
}
    Upstream describes an NGINX upstream.
func NewUpstreamWithDefaultServer ¶
NewUpstreamWithDefaultServer creates an upstream with the default server. proxy_pass to an upstream with the default server returns 502. We use it for services that have no endpoints.