Skip to content

Commit

Permalink
fix: fix nil reference in sts update controller (#553)
Browse files Browse the repository at this point in the history
Signed-off-by: arkbriar <arkbriar@gmail.com>
  • Loading branch information
arkbriar authored Nov 22, 2023
1 parent 22633d6 commit 6882392
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/controller/risingwave_compute_sts_update_strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ func (s *RisingWaveComputeSTSUpdateStrategy) SetupWithManager(mgr ctrl.Manager)

// Owned by RisingWave.
ownerRef := metav1.GetControllerOfNoCopy(object)
if ownerRef == nil {
return nil
}
if ownerRef.APIVersion != gvk.GroupVersion().String() || ownerRef.Kind != gvk.Kind {
return nil
}
Expand Down

0 comments on commit 6882392

Please sign in to comment.