Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
[elasticsearch] fix certificate cnames (#1624)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmlrt committed Mar 18, 2022
1 parent 63a1044 commit 930e902
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions elasticsearch/templates/_helpers.tpl
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
Generate certificates
*/}}
{{- define "elasticsearch.gen-certs" -}}
{{- $altNames := list ( printf "%s.%s" (include "elasticsearch.name" .) .Release.Namespace ) ( printf "%s.%s.svc" (include "elasticsearch.name" .) .Release.Namespace ) -}}
{{- $altNames := list ( printf "%s.%s" (include "elasticsearch.masterService" .) .Release.Namespace ) ( printf "%s.%s.svc" (include "elasticsearch.masterService" .) .Release.Namespace ) -}}
{{- $ca := genCA "elasticsearch-ca" 365 -}}
{{- $cert := genSignedCert ( include "elasticsearch.name" . ) nil $altNames 365 $ca -}}
{{- $cert := genSignedCert ( include "elasticsearch.masterService" . ) nil $altNames 365 $ca -}}
tls.crt: {{ $cert.Cert | toString | b64enc }}
tls.key: {{ $cert.Key | toString | b64enc }}
ca.crt: {{ $ca.Cert | toString | b64enc }}
Expand Down

0 comments on commit 930e902

Please sign in to comment.