Skip to content

Commit 06914d2

Browse files
add nil pointer check
Signed-off-by: Rashmi Gottipati <[email protected]>
1 parent c2c2fb3 commit 06914d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/controllers/clusterextension_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
328328
}
329329

330330
for _, preflight := range r.Preflights {
331-
if ext.Spec.Preflight != nil {
331+
if ext.Spec.Preflight != nil && ext.Spec.Preflight.CRDUpgradeSafety != nil {
332332
if _, ok := preflight.(*crdupgradesafety.Preflight); ok && ext.Spec.Preflight.CRDUpgradeSafety.Disabled {
333333
// Skip this preflight check because it is of type *crdupgradesafety.Preflight and the CRD Upgrade Safety
334334
// preflight check has been disabled

0 commit comments

Comments
 (0)