Skip to content

Commit 318b386

Browse files
srodenhuisferruhcihanj-zimnowoda
authored
fix: rm home alerts (#1706)
Co-authored-by: Ferruh Cihan <[email protected]> Co-authored-by: Jehoszafat Zimnowoda <[email protected]>
1 parent 1fc5153 commit 318b386

File tree

7 files changed

+8
-69
lines changed

7 files changed

+8
-69
lines changed

apps.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ appsInfo:
303303
license: Apache 2.0
304304
about: Sealed Secrets is a Kubernetes Custom Resource Definition Controller which allows you to store even sensitive information in Git repositories.
305305
integration: APL uses Sealed Secrets to provide a secure way to store Kubernetes secrets in Git repositories. Sealed Secrets can be used to store secrets in the values repository.
306-
isBeta: true
307306
tempo:
308307
title: Tempo
309308
appVersion: 2.1.1

helmfile.d/snippets/alertmanager.gotmpl

+3-45
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
{{- $receivers := .instance | get "alerts.receivers" (.root | get "alerts.receivers" (list "slack")) }}
22
{{- $suffix := (true | ternary "" ".monitoring.svc.cluster.local") }}
3-
{{- $homeReceivers := .root | get "home.receivers" (list "slack") }}
4-
{{- $isHomeMonitored:= .root | get "otomi.isHomeMonitored" }}
53
global:
6-
{{- if or (has "slack" $receivers ) (and $isHomeMonitored (has "slack" $homeReceivers)) }}
4+
{{- if (has "slack" $receivers ) }}
75
slack_api_url: {{ .instance | get "alerts.slack.url" (.root | get "alerts.slack.url" (.root | get "home.slack.url" nil)) }}
86
{{- end }}
9-
{{- if or (has "opsgenie" $receivers ) (and $isHomeMonitored (has "opsgenie" $homeReceivers)) }}
7+
{{- if (has "opsgenie" $receivers ) }}
108
opsgenie_api_key: {{ .instance | get "alerts.opsgenie.apiKey" (.root | get "alerts.opsgenie.apiKey" (.root | get "home.opsgenie.apiKey" nil)) }}
119
opsgenie_api_url: {{ .instance | get "alerts.opsgenie.url" (.root | get "alerts.opsgenie.url" (.root | get "home.opsgenie.url" nil)) }}
1210
{{- end }}
13-
{{- if or (has "email" $receivers) (and $isHomeMonitored (has "email" $homeReceivers)) }}
11+
{{- if or (has "email" $receivers) }}
1412
smtp_smarthost: {{ .root | get "smtp.smarthost" }}
1513
smtp_hello: {{ .root | get "smtp.hello" .root.cluster.domainSuffix }}
1614
smtp_from: {{ .root | get "smtp.from" (print "alerts@" .root.cluster.domainSuffix) }}
@@ -51,16 +49,6 @@ route:
5149
{{- else }}
5250
receiver: critical
5351
{{- end }}
54-
{{- if $isHomeMonitored }}
55-
continue: true
56-
- match:
57-
severity: critical
58-
{{- if (has "none" $receivers ) }}
59-
receiver: "null"
60-
{{- else }}
61-
receiver: critical-home
62-
{{- end }}
63-
{{- end }}
6452
receivers:
6553
- name: "null"
6654
{{- if not (has "none" $receivers ) }}
@@ -120,34 +108,4 @@ receivers:
120108
send_resolved: true
121109
{{- end }}
122110
{{- end }}
123-
{{- end }}
124-
125-
{{- if $isHomeMonitored }}
126-
- name: critical-home
127-
{{- $receivers := .root.home | get "receivers" }}
128-
# sending criticals also to home to be aware of issues
129-
{{- if has "slack" $receivers }}
130-
slack_configs:
131-
- channel: "#{{ .root | get "home.slack.channelCrit" "mon-otomi-crit" }}"
132-
{{- .slackTpl | nindent 8 }}
133-
{{- end }}
134-
{{- if has "opsgenie" $receivers }}
135-
opsgenie_configs:
136-
- priority: "P1"
137-
send_resolved: true
138-
{{- .opsgenieTpl | nindent 8 }}
139-
{{- end }}
140-
{{- if has "msteams" $receivers }}
141-
webhook_configs:
142-
- url: "http://prometheus-msteams.monitoring.svc.cluster.local:800/high_priority_channel"
143-
send_resolved: true
144-
{{- end }}
145-
{{- if has "email" $receivers }}
146-
{{- $criticalTo := .root | get "home.email.critical" nil }}
147-
{{- if $criticalTo }}
148-
email_configs:
149-
- to: {{ $criticalTo }}
150-
send_resolved: true
151-
{{- end }}
152-
{{- end }}
153111
{{- end }}

helmfile.d/snippets/defaults.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,6 @@ environments:
820820
otomi:
821821
hasExternalDNS: false
822822
hasExternalIDP: false
823-
isHomeMonitored: false
824823
isMultitenant: true
825824
nodeSelector: {}
826825
e2e:

tests/fixtures/env/secrets.settings.yaml

+3-8
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ alerts:
77
lowPrio: https://xxxxxxxx.com
88
slack:
99
url: https://hooks.slack.com/services/id
10-
home:
11-
email:
12-
13-
slack:
14-
url: https://hooks.slack.com/services/id
1510
kms:
1611
sops:
1712
azure:
@@ -24,10 +19,10 @@ otomi:
2419
password: blablabla
2520
smtp:
2621
auth_password: somesecretvalue
22+
platformBackups:
23+
persistentVolumes:
24+
linodeApiToken: justanapitokenhere
2725
obj:
2826
provider:
2927
linode:
3028
secretAccessKey: somesecretvalue
31-
platformBackups:
32-
persistentVolumes:
33-
linodeApiToken: justanapitokenhere

tests/fixtures/env/settings.yaml

-8
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ dns:
2424
zoneIdFilters: []
2525
e2e:
2626
enabled: false
27-
home:
28-
email: {}
29-
receivers:
30-
- slack
31-
slack:
32-
channel: mon-otomi
33-
channelCrit: mon-otomi-crit
3427
ingress:
3528
classes:
3629
- className: private
@@ -78,7 +71,6 @@ otomi:
7871
username: otomi
7972
hasExternalDNS: true
8073
hasExternalIDP: true
81-
isHomeMonitored: false
8274
nodeSelector:
8375
otomi: otomi-sys
8476
version: main

values-changes.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -286,3 +286,5 @@ changes:
286286
- version: 28
287287
deletions:
288288
- 'apps.cnpg.storage'
289+
- 'otomi.isHomeMonitored'
290+
- 'home'

values-schema.yaml

-6
Original file line numberDiff line numberDiff line change
@@ -2653,8 +2653,6 @@ properties:
26532653
entrypoint:
26542654
$ref: '#/definitions/ipV4Address'
26552655
description: Optional. A public IP address that will override (loadbalancer) ip used for registering hosts. This allows for access to private clusters.
2656-
home:
2657-
$ref: '#/definitions/alerts'
26582656
files:
26592657
type: object
26602658
description: 'Custom values for the workload chart.'
@@ -2809,10 +2807,6 @@ properties:
28092807
default: false
28102808
description: Set this to true when bringing your own external IDP such as Azure AD. (Expects required `oidc:` fields to be set.)
28112809
type: boolean
2812-
isHomeMonitored:
2813-
default: false
2814-
description: Whether this cluster is home monitored (like when under a Premium SLA). Sends criticals home.
2815-
type: boolean
28162810
isMultitenant:
28172811
default: true
28182812
description: Whether to separate team metrics and logs. Disabling this lets everybody be admin and see everything.

0 commit comments

Comments
 (0)