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

fix(translator): Only log error for duplicate SNI when the certificate ID are not the same #7147

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
3 changes: 1 addition & 2 deletions internal/dataplane/translator/translate_certs.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ func mergeCerts(logger logr.Logger, certLists ...[]certWrapper) ([]kongstate.Cer
current.cert.ID = cw.cert.ID
current.CreationTimestamp = cw.CreationTimestamp
}
current.snis = append(current.snis, cw.snis...)
}

// although we use current in the end, we only warn/exclude on new ones here. SNIs already in the slice
Expand All @@ -212,7 +211,7 @@ func mergeCerts(logger logr.Logger, certLists ...[]certWrapper) ([]kongstate.Cer
if seen, ok := snisSeen[sni]; !ok {
snisSeen[sni] = *current.cert.ID
current.cert.SNIs = append(current.cert.SNIs, kong.String(sni))
} else {
} else if seen != *current.cert.ID {
// TODO this should really log information about the requesting Listener or Ingress-like, which is
// what binds the SNI to a given Secret. Knowing the Secret ID isn't of great use beyond knowing
// what cert will be served. however, the secretToSNIs input to getCerts does not provide this info
Expand Down