Fix ssl-dh-param issue when secret does not exit
This commit is contained in:
parent
b1c2812dc5
commit
d898169484
1 changed files with 10 additions and 11 deletions
|
@ -564,10 +564,8 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
|
|||
secret, err := n.store.GetSecret(secretName)
|
||||
if err != nil {
|
||||
klog.Warningf("Error reading Secret %q from local store: %v", secretName, err)
|
||||
}
|
||||
|
||||
} else {
|
||||
nsSecName := strings.Replace(secretName, "/", "-", -1)
|
||||
|
||||
dh, ok := secret.Data["dhparam.pem"]
|
||||
if ok {
|
||||
pemFileName, err := ssl.AddOrUpdateDHParam(nsSecName, dh, n.fileSystem)
|
||||
|
@ -578,6 +576,7 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cfg.SSLDHParam = sslDHParam
|
||||
|
||||
|
|
Loading…
Reference in a new issue