Skip to content

Commit

Permalink
Actually use certFile and keyFile settings (#1143)
Browse files Browse the repository at this point in the history
Signed-off-by: Pete Wall <[email protected]>
  • Loading branch information
petewall authored Jan 18, 2025
1 parent 239d778 commit 5eb8e76
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,14 @@ loki.write {{ include "helper.alloy_name" .name | quote }} {
{{- else if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.ca")) "true" }}
ca_pem = {{ include "secrets.read" (dict "object" . "key" "tls.ca" "nonsensitive" true) }}
{{- end }}
{{- if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.cert")) "true" }}
{{- if .tls.certFile }}
cert_file = {{ .tls.certFile | quote }}
{{- else if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.cert")) "true" }}
cert_pem = {{ include "secrets.read" (dict "object" . "key" "tls.cert" "nonsensitive" true) }}
{{- end }}
{{- if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.key")) "true" }}
{{- if .tls.keyFile }}
key_file = {{ .tls.keyFile | quote }}
{{- else if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.key")) "true" }}
key_pem = {{ include "secrets.read" (dict "object" . "key" "tls.key") }}
{{- end }}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,14 @@ otelcol.exporter.otlphttp {{ include "helper.alloy_name" .name | quote }} {
{{- else if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.ca")) "true" }}
ca_pem = {{ include "secrets.read" (dict "object" . "key" "tls.ca" "nonsensitive" true) }}
{{- end }}
{{- if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.cert")) "true" }}
{{- if .tls.certFile }}
cert_file = {{ .tls.certFile | quote }}
{{- else if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.cert")) "true" }}
cert_pem = {{ include "secrets.read" (dict "object" . "key" "tls.cert" "nonsensitive" true) }}
{{- end }}
{{- if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.key")) "true" }}
{{- if .tls.keyFile }}
key_file = {{ .tls.keyFile | quote }}
{{- else if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.key")) "true" }}
key_pem = {{ include "secrets.read" (dict "object" . "key" "tls.key") }}
{{- end }}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,14 @@ prometheus.remote_write {{ include "helper.alloy_name" .name | quote }} {
{{- else if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.ca")) "true" }}
ca_pem = {{ include "secrets.read" (dict "object" . "key" "tls.ca" "nonsensitive" true) }}
{{- end }}
{{- if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.cert")) "true" }}
{{- if .tls.certFile }}
cert_file = {{ .tls.certFile | quote }}
{{- else if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.cert")) "true" }}
cert_pem = {{ include "secrets.read" (dict "object" . "key" "tls.cert" "nonsensitive" true) }}
{{- end }}
{{- if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.key")) "true" }}
{{- if .tls.keyFile }}
key_file = {{ .tls.keyFile | quote }}
{{- else if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.key")) "true" }}
key_pem = {{ include "secrets.read" (dict "object" . "key" "tls.key") }}
{{- end }}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,14 @@ pyroscope.write {{ include "helper.alloy_name" .name | quote }} {
{{- else if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.ca")) "true" }}
ca_pem = {{ include "secrets.read" (dict "object" . "key" "tls.ca" "nonsensitive" true) }}
{{- end }}
{{- if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.cert")) "true" }}
{{- if .tls.certFile }}
cert_file = {{ .tls.certFile | quote }}
{{- else if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.cert")) "true" }}
cert_pem = {{ include "secrets.read" (dict "object" . "key" "tls.cert" "nonsensitive" true) }}
{{- end }}
{{- if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.key")) "true" }}
{{- if .tls.keyFile }}
key_file = {{ .tls.keyFile | quote }}
{{- else if eq (include "secrets.usesSecret" (dict "object" . "key" "tls.key")) "true" }}
key_pem = {{ include "secrets.read" (dict "object" . "key" "tls.key") }}
{{- end }}
}
Expand Down

0 comments on commit 5eb8e76

Please sign in to comment.