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

allow multiple certificates #1029

Closed
wants to merge 1 commit into from

Conversation

zanettea
Copy link

I've implemented an heuristic to provide basic support for multiple certificates. It just works in my use case.
Please consider merging this change.
Thanks

Copy link
Owner

@jcmoraisjr jcmoraisjr left a comment

Choose a reason for hiding this comment

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

I liked the approach, thanks for the contribution. See below a changing suggestion, and please create the pr against master, changes to branches are made later via cherry-pick.

return
}
// in crtFile.CommonName replace wildcards * with common regex wildcard .*
crtFilePattern := strings.ReplaceAll(crtFile.CommonName, "*", ".*")
Copy link
Owner

Choose a reason for hiding this comment

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

I'd use HasPrefix("*.") and, if true, use the resulting of a TrimPrefix("*.") into a HasSuffix() instead of parse and match a regex on every iteration. This is the hot path of a cluster with dozens of thousands of httproutes, so we want all the processing to be as fast as possible.

@github-actions github-actions bot added the Stale label Dec 4, 2023
@github-actions github-actions bot closed this Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants