Skip to content

Commit b4610d8

Browse files
authored
Ignore deleted batch apis in cortex get (#1796)
1 parent e411228 commit b4610d8

File tree

1 file changed

+5
-0
lines changed
  • pkg/operator/resources/batchapi

1 file changed

+5
-0
lines changed

pkg/operator/resources/batchapi/api.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,11 @@ func GetAllAPIs(virtualServices []istioclientnetworking.VirtualService, k8sJobs
192192

193193
for _, jobKey := range inProgressJobKeys {
194194
alreadyAdded := false
195+
if _, ok := batchAPIsMap[jobKey.APIName]; !ok {
196+
// It is possible that the Batch API may have been deleted but the in progress job keys have not been deleted yet
197+
continue
198+
}
199+
195200
for _, jobStatus := range batchAPIsMap[jobKey.APIName].JobStatuses {
196201
if jobStatus.ID == jobKey.ID {
197202
alreadyAdded = true

0 commit comments

Comments
 (0)