Skip to content

Commit

Permalink
fix: k8s client status cond is possible null in podState
Browse files Browse the repository at this point in the history
Signed-off-by: GlobefishNG <yongcong.ma@neuralgalaxy.com>
  • Loading branch information
GlobeFishNG committed Aug 28, 2024
1 parent 5a37e61 commit 84f727e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ class K8sClient {
if( status.conditions instanceof List ) {
final allConditions = status.conditions as List<Map>
final cond = allConditions.find { cond -> cond.type == 'PodScheduled' }
if( cond.reason == 'Unschedulable' ) {
if( cond?.reason == 'Unschedulable' ) {
def message = "K8s pod cannot be scheduled"
if( cond.message ) message += " -- $cond.message"
//def cause = new K8sResponseException(resp)
Expand Down

0 comments on commit 84f727e

Please sign in to comment.