@@ -867,9 +867,11 @@ func (t *DynamicReadinessTracker) handlePodsFromDeploymentStatus(status *deploym
867
867
taskState .AddResourceState (pod .Name , taskState .Namespace (), podGvk )
868
868
taskState .AddDependency (taskState .Name (), taskState .Namespace (), taskState .GroupVersionKind (), pod .Name , taskState .Namespace (), podGvk )
869
869
870
- taskState .ResourceState (pod .Name , taskState .Namespace (), podGvk ).RWTransaction (func (rs * statestore.ResourceState ) {
871
- setPodStatusAttribute (rs , pod .StatusIndicator .Value )
872
- })
870
+ if pod .StatusIndicator != nil {
871
+ taskState .ResourceState (pod .Name , taskState .Namespace (), podGvk ).RWTransaction (func (rs * statestore.ResourceState ) {
872
+ setPodStatusAttribute (rs , pod .StatusIndicator .Value )
873
+ })
874
+ }
873
875
}
874
876
}
875
877
@@ -882,9 +884,11 @@ func (t *DynamicReadinessTracker) handlePodsFromStatefulSetStatus(status *statef
882
884
taskState .AddResourceState (pod .Name , taskState .Namespace (), podGvk )
883
885
taskState .AddDependency (taskState .Name (), taskState .Namespace (), taskState .GroupVersionKind (), pod .Name , taskState .Namespace (), podGvk )
884
886
885
- taskState .ResourceState (pod .Name , taskState .Namespace (), podGvk ).RWTransaction (func (rs * statestore.ResourceState ) {
886
- setPodStatusAttribute (rs , pod .StatusIndicator .Value )
887
- })
887
+ if pod .StatusIndicator != nil {
888
+ taskState .ResourceState (pod .Name , taskState .Namespace (), podGvk ).RWTransaction (func (rs * statestore.ResourceState ) {
889
+ setPodStatusAttribute (rs , pod .StatusIndicator .Value )
890
+ })
891
+ }
888
892
}
889
893
}
890
894
@@ -897,9 +901,11 @@ func (t *DynamicReadinessTracker) handlePodsFromDaemonSetStatus(status *daemonse
897
901
taskState .AddResourceState (pod .Name , taskState .Namespace (), podGvk )
898
902
taskState .AddDependency (taskState .Name (), taskState .Namespace (), taskState .GroupVersionKind (), pod .Name , taskState .Namespace (), podGvk )
899
903
900
- taskState .ResourceState (pod .Name , taskState .Namespace (), podGvk ).RWTransaction (func (rs * statestore.ResourceState ) {
901
- setPodStatusAttribute (rs , pod .StatusIndicator .Value )
902
- })
904
+ if pod .StatusIndicator != nil {
905
+ taskState .ResourceState (pod .Name , taskState .Namespace (), podGvk ).RWTransaction (func (rs * statestore.ResourceState ) {
906
+ setPodStatusAttribute (rs , pod .StatusIndicator .Value )
907
+ })
908
+ }
903
909
}
904
910
}
905
911
@@ -908,9 +914,11 @@ func (t *DynamicReadinessTracker) handlePodsFromJobStatus(status *job.JobStatus,
908
914
taskState .AddResourceState (pod .Name , taskState .Namespace (), podGvk )
909
915
taskState .AddDependency (taskState .Name (), taskState .Namespace (), taskState .GroupVersionKind (), pod .Name , taskState .Namespace (), podGvk )
910
916
911
- taskState .ResourceState (pod .Name , taskState .Namespace (), podGvk ).RWTransaction (func (rs * statestore.ResourceState ) {
912
- setPodStatusAttribute (rs , pod .StatusIndicator .Value )
913
- })
917
+ if pod .StatusIndicator != nil {
918
+ taskState .ResourceState (pod .Name , taskState .Namespace (), podGvk ).RWTransaction (func (rs * statestore.ResourceState ) {
919
+ setPodStatusAttribute (rs , pod .StatusIndicator .Value )
920
+ })
921
+ }
914
922
}
915
923
}
916
924
@@ -923,9 +931,11 @@ func (t *DynamicReadinessTracker) handlePodsFromDeploymentPodAddedReport(report
923
931
taskState .AddDependency (taskState .Name (), taskState .Namespace (), taskState .GroupVersionKind (), report .ReplicaSetPod .Name , taskState .Namespace (), podGvk )
924
932
925
933
for _ , pod := range report .DeploymentStatus .Pods {
926
- taskState .ResourceState (report .ReplicaSetPod .Name , taskState .Namespace (), podGvk ).RWTransaction (func (rs * statestore.ResourceState ) {
927
- setPodStatusAttribute (rs , pod .StatusIndicator .Value )
928
- })
934
+ if pod .StatusIndicator != nil {
935
+ taskState .ResourceState (report .ReplicaSetPod .Name , taskState .Namespace (), podGvk ).RWTransaction (func (rs * statestore.ResourceState ) {
936
+ setPodStatusAttribute (rs , pod .StatusIndicator .Value )
937
+ })
938
+ }
929
939
}
930
940
}
931
941
@@ -938,9 +948,11 @@ func (t *DynamicReadinessTracker) handlePodsFromStatefulSetPodAddedReport(report
938
948
taskState .AddDependency (taskState .Name (), taskState .Namespace (), taskState .GroupVersionKind (), report .ReplicaSetPod .Name , taskState .Namespace (), podGvk )
939
949
940
950
for _ , pod := range report .StatefulSetStatus .Pods {
941
- taskState .ResourceState (report .ReplicaSetPod .Name , taskState .Namespace (), podGvk ).RWTransaction (func (rs * statestore.ResourceState ) {
942
- setPodStatusAttribute (rs , pod .StatusIndicator .Value )
943
- })
951
+ if pod .StatusIndicator != nil {
952
+ taskState .ResourceState (report .ReplicaSetPod .Name , taskState .Namespace (), podGvk ).RWTransaction (func (rs * statestore.ResourceState ) {
953
+ setPodStatusAttribute (rs , pod .StatusIndicator .Value )
954
+ })
955
+ }
944
956
}
945
957
}
946
958
@@ -953,9 +965,11 @@ func (t *DynamicReadinessTracker) handlePodsFromDaemonSetPodAddedReport(report *
953
965
taskState .AddDependency (taskState .Name (), taskState .Namespace (), taskState .GroupVersionKind (), report .Pod .Name , taskState .Namespace (), podGvk )
954
966
955
967
for _ , pod := range report .DaemonSetStatus .Pods {
956
- taskState .ResourceState (report .Pod .Name , taskState .Namespace (), podGvk ).RWTransaction (func (rs * statestore.ResourceState ) {
957
- setPodStatusAttribute (rs , pod .StatusIndicator .Value )
958
- })
968
+ if pod .StatusIndicator != nil {
969
+ taskState .ResourceState (report .Pod .Name , taskState .Namespace (), podGvk ).RWTransaction (func (rs * statestore.ResourceState ) {
970
+ setPodStatusAttribute (rs , pod .StatusIndicator .Value )
971
+ })
972
+ }
959
973
}
960
974
}
961
975
@@ -964,9 +978,11 @@ func (t *DynamicReadinessTracker) handlePodsFromJobPodAddedReport(report *job.Po
964
978
taskState .AddDependency (taskState .Name (), taskState .Namespace (), taskState .GroupVersionKind (), report .PodName , taskState .Namespace (), podGvk )
965
979
966
980
for _ , pod := range report .JobStatus .Pods {
967
- taskState .ResourceState (report .PodName , taskState .Namespace (), podGvk ).RWTransaction (func (rs * statestore.ResourceState ) {
968
- setPodStatusAttribute (rs , pod .StatusIndicator .Value )
969
- })
981
+ if pod .StatusIndicator != nil {
982
+ taskState .ResourceState (report .PodName , taskState .Namespace (), podGvk ).RWTransaction (func (rs * statestore.ResourceState ) {
983
+ setPodStatusAttribute (rs , pod .StatusIndicator .Value )
984
+ })
985
+ }
970
986
}
971
987
}
972
988
0 commit comments