mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-01-25 06:36:48 -05:00
968cdc1a38
* cli: move internal packages Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com> * cli: fix buildfiles Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com> * bazel: fix exclude dir Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com> * cli: move back libraries that will not be used by TF provider Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com> --------- Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>
25 lines
1.1 KiB
Smarty
25 lines
1.1 KiB
Smarty
{{- define "clustermesh-config-generate-etcd-cfg" }}
|
|
{{- $cluster := index . 0 -}}
|
|
{{- $domain := index . 1 -}}
|
|
{{- $override := index . 2 -}}
|
|
{{- /* The parenthesis around $cluster.tls are required, since it can be null: https://stackoverflow.com/a/68807258 */}}
|
|
{{- $prefix := ternary "common-" (printf "%s." $cluster.name) (or (ne $override "") (empty ($cluster.tls).cert) (empty ($cluster.tls).key)) -}}
|
|
|
|
endpoints:
|
|
{{- if ne $override "" }}
|
|
- {{ $override }}
|
|
{{- else if $cluster.ips }}
|
|
- https://{{ $cluster.name }}.{{ $domain }}:{{ $cluster.port }}
|
|
{{- else }}
|
|
- https://{{ $cluster.address | required "missing clustermesh.apiserver.config.clusters.address" }}:{{ $cluster.port }}
|
|
{{- end }}
|
|
{{- if not (empty ($cluster.tls).caCert) }}
|
|
{{- /* The custom CA configuration takes effect only if a custom certificate and key are also set */}}
|
|
trusted-ca-file: /var/lib/cilium/clustermesh/{{ $prefix }}etcd-client-ca.crt
|
|
{{- else }}
|
|
trusted-ca-file: /var/lib/cilium/clustermesh/common-etcd-client-ca.crt
|
|
{{- end }}
|
|
key-file: /var/lib/cilium/clustermesh/{{ $prefix }}etcd-client.key
|
|
cert-file: /var/lib/cilium/clustermesh/{{ $prefix }}etcd-client.crt
|
|
{{- end }}
|