diff --git a/pkg/controller/risingwave_compute_sts_update_strategy.go b/pkg/controller/risingwave_compute_sts_update_strategy.go index 1ff4bc61..ab49c623 100644 --- a/pkg/controller/risingwave_compute_sts_update_strategy.go +++ b/pkg/controller/risingwave_compute_sts_update_strategy.go @@ -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 }