-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alertmanager ttl #6371
base: main
Are you sure you want to change the base?
Alertmanager ttl #6371
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ | |
// https://github.com/prometheus/alertmanager/issues/1985 | ||
type alertmanagerConfig struct { | ||
Global *globalConfig `yaml:"global,omitempty" json:"global,omitempty"` | ||
TTL duration `yaml:"ttl,omitempty" json:"ttl,omitempty"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have a linting problem here, you can fix it by running |
||
Route *route `yaml:"route,omitempty" json:"route,omitempty"` | ||
InhibitRules []*inhibitRule `yaml:"inhibit_rules,omitempty" json:"inhibit_rules,omitempty"` | ||
Receivers []*receiver `yaml:"receivers,omitempty" json:"receivers,omitempty"` | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -19,6 +19,7 @@ import ( | |||||
"errors" | ||||||
"fmt" | ||||||
"strings" | ||||||
"time" | ||||||
|
||||||
monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" | ||||||
|
||||||
|
@@ -783,6 +784,9 @@ type PushoverConfig struct { | |||||
// Notification title. | ||||||
// +optional | ||||||
Title string `json:"title,omitempty"` | ||||||
// time to live for the alert notification | ||||||
// +optional | ||||||
TTL time.Duration `json:"ttl,omitempty"` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
We have a custom Duration type, which has some useful validations on the API level. Could we use this one instead? Also, we follow k8s API conventions as much as possible, which means we want to use pointers for optional fields. |
||||||
// Notification message. | ||||||
// +optional | ||||||
Message string `json:"message,omitempty"` | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this change intentional?