Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore default certificate during server initialization #4563

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/ingress/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1090,8 +1090,8 @@ func (n *NGINXController) createServers(data []*ingress.Ingress,
servers[host].SSLCiphers = anns.SSLCiphers
}

// only add a certificate if the server does not have one previously configured
if servers[host].SSLCert != nil {
// only add a certificate if the server does not have one previously configured that is not the default
if servers[host].SSLCert != nil && servers[host].SSLCert.PemFileName != n.cfg.DefaultSSLCertificate && servers[host].SSLCert != n.cfg.FakeCertificate {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zeeZ I think this is not required. Since I removed the static SSL mode in #4356 the SSLCert is configured only when the ingress has a valid TLS section, it never contains the default or fake SSL certificate

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just checked against the current master and you're absolutely correct, the behavior changed since the last release!

continue
}

Expand Down