Add Canary Webhook checksum.

This adds a new Checksum field to the canary webhook body, which is a
hash of the LastAppliedSpec and TrackedConfigs.

This can be used to identify the rollout of a specific configuration,
and differentiate between webhooks being sent for different
configuration and deployment versions.

Signed-off-by: Kevin McDermott <kevin@weave.works>
This commit is contained in:
Kevin McDermott
2023-09-08 14:09:17 +01:00
committed by Kevin McDermott
parent 788e692e90
commit 56b6339f8c
8 changed files with 178 additions and 37 deletions

View File

@@ -403,6 +403,11 @@ type CanaryWebhookPayload struct {
// Phase of the canary analysis
Phase CanaryPhase `json:"phase"`
// Hash from the TrackedConfigs and LastAppliedSpec of the Canary.
// Can be used to identify a Canary for a specific configuration of the
// deployed resources.
Checksum string `json:"checksum"`
// Metadata (key-value pairs) for this webhook
Metadata map[string]string `json:"metadata,omitempty"`
}