fix when the type of svc is nodeport. resourcebindings FULLYAPPLIED field is False
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
This commit is contained in:
parent
5577f05587
commit
52a3c46218
|
@ -177,21 +177,23 @@ func assembleWorkStatus(works []workv1alpha1.Work, workload *unstructured.Unstru
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// resources with no status,only record whether the propagation is successful in work
|
||||||
|
aggregatedStatus := workv1alpha2.AggregatedStatusItem{
|
||||||
|
ClusterName: clusterName,
|
||||||
|
Applied: applied,
|
||||||
|
}
|
||||||
|
|
||||||
for _, manifestStatus := range work.Status.ManifestStatuses {
|
for _, manifestStatus := range work.Status.ManifestStatuses {
|
||||||
equal, err := equalIdentifier(&manifestStatus.Identifier, identifierIndex, workload)
|
equal, err := equalIdentifier(&manifestStatus.Identifier, identifierIndex, workload)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if equal {
|
if equal {
|
||||||
aggregatedStatus := workv1alpha2.AggregatedStatusItem{
|
aggregatedStatus.Status = manifestStatus.Status
|
||||||
ClusterName: clusterName,
|
|
||||||
Status: manifestStatus.Status,
|
|
||||||
Applied: applied,
|
|
||||||
}
|
|
||||||
statuses = append(statuses, aggregatedStatus)
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
statuses = append(statuses, aggregatedStatus)
|
||||||
}
|
}
|
||||||
|
|
||||||
sort.Slice(statuses, func(i, j int) bool {
|
sort.Slice(statuses, func(i, j int) bool {
|
||||||
|
|
Loading…
Reference in New Issue