Documentation ¶
Index ¶
- func NewDefaultServer() ingress.UpstreamServer
- func NewUpstream(name string) *ingress.Upstream
- type Manager
- func (nginx *Manager) AddOrUpdateCertAndKey(name string, cert string, key string) (ingress.SSLCert, error)
- func (ngx Manager) Check(_ *http.Request) error
- func (ngx *Manager) CheckAndReload(cfg config.Configuration, ingressCfg ingress.Configuration) error
- func (ngx Manager) Name() string
- func (ngx *Manager) ReadConfig(conf *api.ConfigMap) config.Configuration
- func (nginx *Manager) SearchDHParamFile(baseDir string) string
- func (ngx *Manager) Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultServer ¶
func NewDefaultServer() ingress.UpstreamServer
NewDefaultServer return an UpstreamServer to be use as default server that returns 503.
func NewUpstream ¶
NewUpstream creates an upstream without servers.
Types ¶
type Manager ¶
type Manager struct { ConfigFile string // contains filtered or unexported fields }
Manager ...
func (*Manager) AddOrUpdateCertAndKey ¶
func (nginx *Manager) AddOrUpdateCertAndKey(name string, cert string, key string) (ingress.SSLCert, error)
AddOrUpdateCertAndKey creates a .pem file wth the cert and the key with the specified name
func (Manager) Check ¶
Check returns if the nginx healthz endpoint is returning ok (status code 200)
func (*Manager) CheckAndReload ¶
func (ngx *Manager) CheckAndReload(cfg config.Configuration, ingressCfg ingress.Configuration) error
CheckAndReload verify if the nginx configuration changed and sends a reload
the master process receives the signal to reload configuration, it checks the syntax validity of the new configuration file and tries to apply the configuration provided in it. If this is a success, the master process starts new worker processes and sends messages to old worker processes, requesting them to shut down. Otherwise, the master process rolls back the changes and continues to work with the old configuration. Old worker processes, receiving a command to shut down, stop accepting new connections and continue to service current requests until all such requests are serviced. After that, the old worker processes exit. http://nginx.org/en/docs/beginners_guide.html#control
func (*Manager) ReadConfig ¶
func (ngx *Manager) ReadConfig(conf *api.ConfigMap) config.Configuration
ReadConfig obtains the configuration defined by the user merged with the defaults.
func (*Manager) SearchDHParamFile ¶
SearchDHParamFile iterates all the secrets mounted inside the /etc/nginx-ssl directory in order to find a file with the name dhparam.pem. If such file exists it will returns the path. If not it just returns an empty string