mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
If applied, this commit will add an optional canary spec field named summary for notification purposes
Signed-off-by: baldey-nz <baldey@gmail.com>
This commit is contained in:
@@ -79,6 +79,9 @@ spec:
|
||||
- service
|
||||
- analysis
|
||||
properties:
|
||||
summary:
|
||||
description: Optional msg to add to each notification
|
||||
type: string
|
||||
provider:
|
||||
description: Traffic managent provider
|
||||
type: string
|
||||
|
||||
@@ -103,6 +103,10 @@ type CanarySpec struct {
|
||||
// revert canary mutation on deletion of canary resource
|
||||
// +optional
|
||||
RevertOnDeletion bool `json:"revertOnDeletion,omitempty"`
|
||||
|
||||
// Summary creates new notification message
|
||||
// +optional
|
||||
Summary string `json:"summary,omitempty"`
|
||||
}
|
||||
|
||||
// CanaryService defines how ClusterIP services, service mesh or ingress routing objects are generated
|
||||
|
||||
@@ -175,6 +175,16 @@ func (c *Controller) alert(canary *flaggerv1.Canary, message string, metadata bo
|
||||
|
||||
func alertMetadata(canary *flaggerv1.Canary) []notifier.Field {
|
||||
var fields []notifier.Field
|
||||
|
||||
if canary.Spec.Summary != "" {
|
||||
fields = append(fields,
|
||||
notifier.Field{
|
||||
Name: "Summary",
|
||||
Value: canary.Spec.Summary,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
fields = append(fields,
|
||||
notifier.Field{
|
||||
Name: "Target",
|
||||
|
||||
Reference in New Issue
Block a user