Skip to content

Commit

Permalink
Fix: check if StatefulSet is set as PVC owner ref (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
regadas authored Jan 13, 2022
1 parent b71d0dc commit fee6b50
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions controllers/flinkcluster_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,10 @@ func (reconciler *ClusterReconciler) reconcilePersistentVolumeClaim(pvc *corev1.
ctx := reconciler.context
k8sClient := reconciler.k8sClient

if len(pvc.GetOwnerReferences()) != 0 {
return nil
for _, ownerRef := range pvc.GetOwnerReferences() {
if ownerRef.Kind == sset.Kind {
return nil
}
}

patch := fmt.Sprintf(
Expand Down

0 comments on commit fee6b50

Please sign in to comment.