2023-10-16 13:14:53 -04:00
|
|
|
{{- if .Values.clustermesh.config.enabled }}
|
2022-08-12 04:20:19 -04:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Secret
|
|
|
|
metadata:
|
|
|
|
name: cilium-clustermesh
|
|
|
|
namespace: {{ .Release.Namespace }}
|
2023-10-16 13:14:53 -04:00
|
|
|
{{- with .Values.clustermesh.annotations }}
|
|
|
|
annotations:
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
{{- end }}
|
2022-08-12 04:20:19 -04:00
|
|
|
data:
|
2023-10-16 13:14:53 -04:00
|
|
|
{{- $kvstoremesh := and .Values.clustermesh.useAPIServer .Values.clustermesh.apiserver.kvstoremesh.enabled }}
|
|
|
|
{{- $override := ternary (printf "https://clustermesh-apiserver.%s.svc:2379" .Release.Namespace) "" $kvstoremesh }}
|
2022-08-12 04:20:19 -04:00
|
|
|
{{- range .Values.clustermesh.config.clusters }}
|
2023-10-16 13:14:53 -04:00
|
|
|
{{ .name }}: {{ include "clustermesh-config-generate-etcd-cfg" (list . $.Values.clustermesh.config.domain $override) | b64enc }}
|
|
|
|
{{- /* The parenthesis around .tls are required, since it can be null: https://stackoverflow.com/a/68807258 */}}
|
|
|
|
{{- if and (eq $override "") (.tls).cert (.tls).key }}
|
|
|
|
{{- if .tls.caCert }}
|
|
|
|
{{ .name }}.etcd-client-ca.crt: {{ .tls.caCert }}
|
|
|
|
{{- end }}
|
2022-08-12 04:20:19 -04:00
|
|
|
{{ .name }}.etcd-client.key: {{ .tls.key }}
|
|
|
|
{{ .name }}.etcd-client.crt: {{ .tls.cert }}
|
|
|
|
{{- end }}
|
2023-10-16 13:14:53 -04:00
|
|
|
{{- end }}
|
2022-08-12 04:20:19 -04:00
|
|
|
{{- end }}
|