Skip to content

Commit f56da67

Browse files
authored
feat(cockpit): add received_resolved field (#4491)
1 parent cff820e commit f56da67

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

cmd/scw/testdata/test-all-usage-cockpit-contact-point-create-usage.golden

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ USAGE:
88
scw cockpit contact-point create [arg=value ...]
99

1010
ARGS:
11-
[project-id] Project ID to use. If none is passed the default project ID will be used
12-
[email.to]
13-
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
11+
[project-id] Project ID to use. If none is passed the default project ID will be used
12+
[email.to]
13+
[receive-resolved-notifications] Send an email notification when an alert is marked as resolved
14+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1415

1516
FLAGS:
1617
-h, --help help for create

docs/commands/cockpit.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ scw cockpit contact-point create [arg=value ...]
135135
|------|---|-------------|
136136
| project-id | | Project ID to use. If none is passed the default project ID will be used |
137137
| email.to | | |
138+
| receive-resolved-notifications | | Send an email notification when an alert is marked as resolved |
138139
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
139140

140141

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ require (
2626
github.com/mattn/go-isatty v0.0.20
2727
github.com/moby/buildkit v0.13.2
2828
github.com/opencontainers/go-digest v1.0.0
29-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32
29+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250205135620-3eb9faddf455
3030
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
3131
github.com/spf13/cobra v1.8.1
3232
github.com/spf13/pflag v1.0.6

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
464464
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
465465
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
466466
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
467-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32 h1:4+LP7qmsLSGbmc66m1s5dKRMBwztRppfxFKlYqYte/c=
468-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32/go.mod h1:kzh+BSAvpoyHHdHBCDhmSWtBc1NbLMZ2lWHqnBoxFks=
467+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250205135620-3eb9faddf455 h1:g3F+SVHuaSuU5mfzLLkaGMQiza81gFxiul+DXjTfI+w=
468+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250205135620-3eb9faddf455/go.mod h1:792k1RTU+5JeMXm35/e2Wgp71qPH/DmDoZrRc+EFZDk=
469469
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
470470
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
471471
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/cockpit/v1/cockpit_cli.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,13 @@ If you need to receive alerts for other receivers, you can create additional con
10171017
Deprecated: false,
10181018
Positional: false,
10191019
},
1020+
{
1021+
Name: "receive-resolved-notifications",
1022+
Short: `Send an email notification when an alert is marked as resolved`,
1023+
Required: false,
1024+
Deprecated: false,
1025+
Positional: false,
1026+
},
10201027
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
10211028
},
10221029
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {

0 commit comments

Comments
 (0)