-
Notifications
You must be signed in to change notification settings - Fork 23
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
common name annotation for services and ingresses #49
Conversation
9d71e99
to
b1997c9
Compare
annotatedDomains := []string{} | ||
if cn != "" { | ||
annotatedDomains = append(annotatedDomains, cn) | ||
} | ||
for _, e := range strings.Split(a, ",") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we already had a function like this to parse lists in strings in the CMLib.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, there is a function, but it produces a StringSet. The order should be kept here.
if e != "" && e != cn { | ||
domains = append(domains, e) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
} | ||
result := []string{cn} | ||
for _, host := range hosts { | ||
if host != cn { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is is required to exclude the cn from the hosts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is excluded to avoid adding it twice.
What this PR does / why we need it:
Allow to specify the common name for certificates of services and ingresses explicitly by using an annotation
cert.gardener.cloud/commonname
.Which issue(s) this PR fixes:
Fixes #48
Special notes for your reviewer:
Release note: