File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 8
8
{{- if or (has "email" $receivers) (and .root.otomi.isHomeMonitored (has "email" $homeReceivers)) }}
9
9
smtp_smarthost: {{ .instance | get "alerts.email.smtp.smarthost" (.root | get "alerts.email.smtp.smarthost" (.root | get "home.email.smtp.smarthost" nil)) }}
10
10
smtp_hello: {{ .instance | get "alerts.email.smtp.hello" (.root | get "alerts.email.smtp.hello" .root.cluster.domain) }}
11
- smtp_from: {{ .instance | get "alerts.email.smtp.from" (.root | get "alerts.email.smtp.from" (print "alerts@" .root.cluster.domain)) }}
11
+ smtp_from: {{ .instance | get "alerts.email.smtp.from" (.root | get "alerts.email.smtp.from" (.root | get "home.email.smtp.from" ( print "alerts@" .root.cluster.domain) )) }}
12
12
smtp_auth_username: {{ .instance | get "alerts.email.smtp.auth_username" (.root | get "alerts.email.smtp.auth_username" (.root | get "home.email.smtp.auth_username" nil)) }}
13
13
smtp_auth_password: {{ .instance | get "alerts.email.smtp.auth_password" (.root | get "alerts.email.smtp.auth_password" (.root | get "home.email.smtp.auth_password" nil)) }}
14
14
smtp_auth_secret: {{ .instance | get "alerts.email.smtp.auth_secret" (.root | get "alerts.email.smtp.auth_secret" (.root | get "home.email.smtp.auth_secret" nil)) }}
@@ -73,7 +73,7 @@ receivers:
73
73
send_resolved: true
74
74
{{- end }}
75
75
{{- if has "email" $receivers }}
76
- {{- $criticalTo := .instance | get "alerts.email.critical" (.root | get "alerts.email.critical") }}
76
+ {{- $criticalTo := .instance | get "alerts.email.critical" (.root | get "alerts.email.critical" nil ) }}
77
77
{{- if $criticalTo }}
78
78
email_configs:
79
79
- to: {{ $criticalTo }}
@@ -96,8 +96,10 @@ receivers:
96
96
{{- end }}
97
97
{{- if has "email" $receivers }}
98
98
{{- $criticalTo := .root | get "home.email.critical" nil }}
99
+ {{- if $criticalTo }}
99
100
email_configs:
100
101
- to: {{ $criticalTo }}
101
102
send_resolved: true
103
+ {{- end }}
102
104
{{- end }}
103
105
{{- end }}
You can’t perform that action at this time.
0 commit comments