Skip to content

Commit

Permalink
add nil pointer check
Browse files Browse the repository at this point in the history
Signed-off-by: Rashmi Gottipati <chowdary.grashmi@gmail.com>
  • Loading branch information
rashmigottipati committed Jun 27, 2024
1 parent c2c2fb3 commit 06914d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/controllers/clusterextension_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func (r *ClusterExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alp
}

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

0 comments on commit 06914d2

Please sign in to comment.