Remove dns from nginx. Use upstreams for default backend service
This commit is contained in:
parent
9b142b56f8
commit
28f9cb0b2b
15 changed files with 173 additions and 225 deletions
6
controllers/nginx-third-party/nginx/main.go
vendored
6
controllers/nginx-third-party/nginx/main.go
vendored
|
|
@ -212,9 +212,7 @@ type Service struct {
|
|||
|
||||
// NginxManager ...
|
||||
type NginxManager struct {
|
||||
defBackend Service
|
||||
defCfg *nginxConfiguration
|
||||
defError Service
|
||||
defResolver string
|
||||
|
||||
// path to the configuration file to be used by nginx
|
||||
|
|
@ -272,12 +270,10 @@ func newDefaultNginxCfg() *nginxConfiguration {
|
|||
}
|
||||
|
||||
// NewManager ...
|
||||
func NewManager(kubeClient *client.Client, defaultSvc, customErrorSvc Service) *NginxManager {
|
||||
func NewManager(kubeClient *client.Client) *NginxManager {
|
||||
ngx := &NginxManager{
|
||||
ConfigFile: "/etc/nginx/nginx.conf",
|
||||
defBackend: defaultSvc,
|
||||
defCfg: newDefaultNginxCfg(),
|
||||
defError: customErrorSvc,
|
||||
defResolver: strings.Join(getDnsServers(), " "),
|
||||
reloadLock: &sync.Mutex{},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue