Skip to content

Commit

Permalink
Simplified NPE check on RuntimeClassName
Browse files Browse the repository at this point in the history
  • Loading branch information
allanrogerr committed Jan 12, 2023
1 parent 8ac859e commit 7bb75d7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions operatorapi/tenants.go
Original file line number Diff line number Diff line change
Expand Up @@ -2494,11 +2494,9 @@ func parseTenantPool(pool *miniov2.Pool) *models.Pool {
}
}

runtimeClassNameValue := ""
runtimeClassName := &runtimeClassNameValue

var runtimeClassName string
if pool.RuntimeClassName != nil {
runtimeClassName = pool.RuntimeClassName
runtimeClassName = *pool.RuntimeClassName
}

poolModel := &models.Pool{
Expand All @@ -2514,7 +2512,7 @@ func parseTenantPool(pool *miniov2.Pool) *models.Pool {
Affinity: affinity,
Tolerations: tolerations,
SecurityContext: &securityContext,
RuntimeClassName: *runtimeClassName,
RuntimeClassName: runtimeClassName,
}
return poolModel
}
Expand Down

0 comments on commit 7bb75d7

Please sign in to comment.