Documentation ¶
Index ¶
- type Configuration
- type NGINXController
- func (n *NGINXController) Check(_ *http.Request) error
- func (n NGINXController) DefaultEndpoint() ingress.Endpoint
- func (n NGINXController) GetPublishService() *apiv1.Service
- func (n NGINXController) Name() string
- func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error
- func (n *NGINXController) SetForceReload(shouldReload bool)
- func (n *NGINXController) Start()
- func (n *NGINXController) Stop() error
- type TCPProxy
- type TCPServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { APIServerHost string KubeConfigFile string Client clientset.Interface ResyncPeriod time.Duration ConfigMapName string DefaultService string Namespace string ForceNamespaceIsolation bool // optional TCPConfigMapName string // optional UDPConfigMapName string DefaultHealthzURL string DefaultSSLCertificate string // optional PublishService string UpdateStatus bool UseNodeInternalIP bool ElectionID string UpdateStatusOnShutdown bool SortBackends bool ListenPorts *ngx_config.ListenPorts EnableSSLPassthrough bool EnableProfiling bool EnableSSLChainCompletion bool FakeCertificatePath string FakeCertificateSHA string SyncRateLimit float32 }
Configuration contains all the settings required by an Ingress controller
type NGINXController ¶
type NGINXController struct { Proxy *TCPProxy // contains filtered or unexported fields }
NGINXController ...
func NewNGINXController ¶
func NewNGINXController(config *Configuration, fs file.Filesystem) *NGINXController
NewNGINXController creates a new NGINX Ingress controller. If the environment variable NGINX_BINARY exists it will be used as source for nginx commands
func (*NGINXController) Check ¶
func (n *NGINXController) Check(_ *http.Request) error
Check returns if the nginx healthz endpoint is returning ok (status code 200)
func (NGINXController) DefaultEndpoint ¶
func (n NGINXController) DefaultEndpoint() ingress.Endpoint
DefaultEndpoint returns the default endpoint to be use as default server that returns 404.
func (NGINXController) GetPublishService ¶
func (n NGINXController) GetPublishService() *apiv1.Service
GetPublishService returns the configured service used to set ingress status
func (NGINXController) Name ¶
func (n NGINXController) Name() string
Name returns the healthcheck name
func (*NGINXController) OnUpdate ¶
func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error
OnUpdate is called periodically by syncQueue to keep the configuration in sync.
1. converts configmap configuration to custom configuration object 2. write the custom template (the complexity depends on the implementation) 3. write the configuration file
returning nill implies the backend will be reloaded. if an error is returned means requeue the update
func (*NGINXController) SetForceReload ¶
func (n *NGINXController) SetForceReload(shouldReload bool)
SetForceReload sets if the ingress controller should be reloaded or not
func (*NGINXController) Start ¶
func (n *NGINXController) Start()
Start start a new NGINX master process running in foreground.
func (*NGINXController) Stop ¶
func (n *NGINXController) Stop() error
Stop gracefully stops the NGINX master process.