Skip to content

Commit

Permalink
Merge pull request #93 from nginxinc/secrets
Browse files Browse the repository at this point in the history
Fix overwriting of secrets from different namespaces
  • Loading branch information
pleshakov authored Dec 2, 2016
2 parents 37b2ac0 + 0807419 commit 414a0d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion nginx-controller/nginx/configurator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion nginx-plus-controller/nginx/configurator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 414a0d3

Please sign in to comment.