Skip to content

Commit b0c9d69

Browse files
committed
Add cluster info
1 parent 78c6664 commit b0c9d69

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.github/workflows/alert-deploy.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
name: Deploy alerts
2-
run-name: Deploy alerts for Maskinporten Guardian to test and prod
2+
run-name: Deploy alerts for Pseudo Service to test and prod
33

44
on:
55
pull_request: ## ONLY FOR TESTING, SHOULD BE REMOVED AFTER DEPLOY PR IS MERGED
6-
branches:
6+
branches:
77
- master
88
push:
99
branches:
1010
- master
1111
paths:
12-
- '.nais/alerts.yaml'
13-
- '.github/workflows/alert-deploy.yml'
12+
- ".nais/alerts.yaml"
13+
- ".github/workflows/alert-deploy.yml"
1414
workflow_dispatch:
1515
permissions:
1616
id-token: write
@@ -37,15 +37,16 @@ jobs:
3737
env:
3838
CLUSTER: test
3939
RESOURCE: .nais/alerts.yaml,ext_alertconfig/alertconfig.yaml
40+
VAR: cluster="test"
4041
DEPLOY_SERVER: deploy.ssb.cloud.nais.io:443
41-
42+
4243
prod-deploy:
4344
name: Deploy alerts to prod
4445
runs-on: ubuntu-latest
4546
steps:
4647
- name: Checkout code
4748
uses: actions/checkout@v4
48-
49+
4950
- uses: actions/checkout@v4
5051
name: Retrieve AlertManager configuration
5152
with:
@@ -54,10 +55,11 @@ jobs:
5455
sparse-checkout: |
5556
alertconfig.yaml
5657
sparse-checkout-cone-mode: false
57-
58+
5859
- name: Deploy to prod
5960
uses: nais/deploy/actions/deploy@v2
6061
env:
6162
CLUSTER: prod
6263
RESOURCE: .nais/alerts.yaml,ext_alertconfig/alertconfig.yaml
64+
VAR: cluster="prod"
6365
DEPLOY_SERVER: deploy.ssb.cloud.nais.io:443

.nais/alerts.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ spec:
2323
severity: critical
2424
alertmanager_custom_config: dapla-stat
2525
alert_type: custom
26+
cluster: { { cluster } }
2627

2728
# This alert detects high CPU usage by calculating the CPU time used over 5 minutes.
2829
- alert: HighCPUUsage

0 commit comments

Comments
 (0)