-
Notifications
You must be signed in to change notification settings - Fork 304
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
HPCC-31872 Allow alternate certificate domains #19315
HPCC-31872 Allow alternate certificate domains #19315
Conversation
@afishbeck Could you please review? One question is if the alternate domains also need to be applied to the spiffe URIs? I didn't see any other cases where the current domain is used to generate |
3cdc164
to
118df51
Compare
@@ -1929,7 +1930,9 @@ spec: | |||
{{- end }} | |||
dnsNames: | |||
{{- range $dnsName := $local.dnsNames }} | |||
- {{ (printf "%s.%s" $dnsName $domain) | quote }} | |||
{{- range $altDomain := $local.allDomains }} |
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.
If I were being super picky I would say the variable name "altDomain" is not right. $local.allDomains contains the primary domain and the alts. But hardly matters.
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.
@asselitx looks good.
Accept an `alternativeDomains` configuration property in the certificates issuers section. It is an array of domains other than `domain` that the certificate will be valid for. These values will be added to the helm manifest's Certificate resource's `dnsNames` property, which corresponds to entries in the "Subject Alternative Name" extension of the X.509 certificate. The `domain` value is used in part to derive the `commonName`, and it is still added to the list of `dnsNames` as before. Any ESP and roxie service names are prepended to any of the `domain` and `alternativeDomains` values before adding to the `dnsNames` list. Signed-off-by: Terrence Asselin <[email protected]>
118df51
to
63e2a98
Compare
@ghalliday squashed and renamed PR to follow convention. The failing 'macos-14' check is happening across most PRs currently. |
@@ -1894,6 +1894,7 @@ args: | |||
{{- end -}} | |||
{{- end -}} | |||
{{- $_ := set $local "dnsNames" (uniq $local.dnsNames ) -}} | |||
{{- $_ := set $local "allDomains" (prepend (default list $issuer.alternativeDomains) $domain ) -}} |
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.
Minor: This the default operator is more normally written as
($issuer.alternativeDomains | default list)
(I had to read some documentation to check the semantics...)
2cd34ef
into
hpcc-systems:candidate-9.8.x
Jirabot Action Result: |
Type of change:
Checklist:
Smoketest:
Testing: