diff --git a/nginx-controller/nginx/configurator.go b/nginx-controller/nginx/configurator.go index e266b6b077..377381110c 100644 --- a/nginx-controller/nginx/configurator.go +++ b/nginx-controller/nginx/configurator.go @@ -66,7 +66,8 @@ func (cnf *Configurator) updateCertificates(ingEx *IngressEx) map[string]string continue } - pemFileName := cnf.nginx.AddOrUpdateCertAndKey(secretName, string(cert), string(key)) + name := ingEx.Ingress.Namespace + "-" + secretName + pemFileName := cnf.nginx.AddOrUpdateCertAndKey(name, string(cert), string(key)) for _, host := range tls.Hosts { pems[host] = pemFileName diff --git a/nginx-plus-controller/nginx/configurator.go b/nginx-plus-controller/nginx/configurator.go index c4c8663d12..bc36d91600 100644 --- a/nginx-plus-controller/nginx/configurator.go +++ b/nginx-plus-controller/nginx/configurator.go @@ -68,7 +68,8 @@ func (cnf *Configurator) updateCertificates(ingEx *IngressEx) map[string]string continue } - pemFileName := cnf.nginx.AddOrUpdateCertAndKey(secretName, string(cert), string(key)) + name := ingEx.Ingress.Namespace + "-" + secretName + pemFileName := cnf.nginx.AddOrUpdateCertAndKey(name, string(cert), string(key)) for _, host := range tls.Hosts { pems[host] = pemFileName