Cleanup
This commit is contained in:
parent
29ea30a4e8
commit
a767b1d906
13 changed files with 17 additions and 270 deletions
|
|
@ -828,9 +828,6 @@ func (n *NGINXController) IsDynamicConfigurationEnough(pcfg *ingress.Configurati
|
|||
clearL4serviceEndpoints(©OfRunningConfig)
|
||||
clearL4serviceEndpoints(©OfPcfg)
|
||||
|
||||
copyOfRunningConfig.ControllerPodsCount = 0
|
||||
copyOfPcfg.ControllerPodsCount = 0
|
||||
|
||||
clearCertificates(©OfRunningConfig)
|
||||
clearCertificates(©OfPcfg)
|
||||
|
||||
|
|
@ -856,18 +853,6 @@ func (n *NGINXController) configureDynamically(pcfg *ingress.Configuration) erro
|
|||
}
|
||||
}
|
||||
|
||||
if n.runningConfig.ControllerPodsCount != pcfg.ControllerPodsCount {
|
||||
statusCode, _, err := nginx.NewPostStatusRequest("/configuration/general", "application/json", ingress.GeneralConfig{
|
||||
ControllerPodsCount: pcfg.ControllerPodsCount,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if statusCode != http.StatusCreated {
|
||||
return fmt.Errorf("unexpected error code: %d", statusCode)
|
||||
}
|
||||
}
|
||||
|
||||
serversChanged := !reflect.DeepEqual(n.runningConfig.Servers, pcfg.Servers)
|
||||
if serversChanged {
|
||||
err := configureCertificates(pcfg.Servers)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue