Use a typed escalation fallback instead of fallbackTopic

TerdutTeam spec.escalation.fallback is now {type, address}, mirroring the
server's notification channel model. CRDs regenerated.

Claude-Session: https://claude.ai/code/session_016mBLURvJoMuUEr9cB2RpUN
This commit is contained in:
Niklas Ye
2026-10-12 21:00:40 +02:00
parent 7fb8042265
commit 2d8fe0f275
11 changed files with 117 additions and 16 deletions
+7 -3
View File
@@ -55,10 +55,14 @@ func buildEscalationRequest(spec *terdutv1alpha1.EscalationSpec) (tdclient.SetEs
Targets: targets,
}
}
var fallback tdclient.NotificationTarget
if spec.Fallback != nil {
fallback = tdclient.NotificationTarget{Type: spec.Fallback.Type, Address: spec.Fallback.Address}
}
return tdclient.SetEscalationRequest{
RepeatCount: spec.RepeatCount,
FallbackTopic: spec.FallbackTopic,
Levels: levels,
RepeatCount: spec.RepeatCount,
Fallback: fallback,
Levels: levels,
}, nil
}