Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion chart/templates/monitoring/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ domain: {{ $domainName }}
{{- $thanosEnabled := (.Values.addons.thanos.enabled) }}
{{- $lokiEnabled := (.Values.loki.enabled) }}
{{- $clusterName := ( default "logging-loki" .Values.loki.clusterName ) }}
{{- $vaultIstioHosts := (dig "istio" "vault" "hosts" dict .Values.addons.vault.values) }}

flux:
enabled: true
Expand Down Expand Up @@ -347,7 +348,11 @@ prometheus:
vault.hashicorp.com/role: "prometheus"
vault.hashicorp.com/agent-run-as-user : "1000"
vault.hashicorp.com/agent-run-as-group : "2000"
vault.hashicorp.com/tls-server-name: {{ .Values.domain }}
{{- if and $istioEnabled $vaultIstioHosts }} # the 1st istio vault host will be used for the tls server name
vault.hashicorp.com/tls-server-name: {{ tpl ($vaultIstioHosts | first) $ }}
{{- else }} # the vault certificate is expected to contain the CN or X509v3 Subject Alternative Name of vault.domain
vault.hashicorp.com/tls-server-name: vault.{{ .Values.domain }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.addons.vault.enabled }}
Expand Down