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:
baldey-nz
2021-10-28 07:14:24 +13:00
parent 01d47808a7
commit c638edd346
3 changed files with 17 additions and 0 deletions
+3
View File
@@ -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
+4
View File
@@ -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
+10
View File
@@ -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",