updated the annotation for clustername with new naming convention in argo builder

This commit is contained in:
pb 2025-05-06 17:26:47 +02:00
parent c40b18f1d6
commit ee94c1aa42

View File

@ -433,8 +433,8 @@ func (b *ArgoBuilder) CompleteBuild(executionsId string) (string, error) {
// Update the name of the admiralty node to use
for _, template := range b.Workflow.Spec.Templates {
if len(template.Metadata.Annotations) > 0 {
if _, ok := template.Metadata.Annotations["multicluster.admiralty.io/clustername"]; ok {
template.Metadata.Annotations["multicluster.admiralty.io/clustername"] = "target-" + conf.GetConfig().ExecutionID
if peerId, ok := template.Metadata.Annotations["multicluster.admiralty.io/clustername"]; ok {
template.Metadata.Annotations["multicluster.admiralty.io/clustername"] = "target-" + peerId + "-" + conf.GetConfig().ExecutionID
}
}
}