Skip to content

Commit

Permalink
Fix finding of the linter
Browse files Browse the repository at this point in the history
  • Loading branch information
vpnachev committed Jun 28, 2023
1 parent d0f0cea commit 26ab3d2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/controller/seed/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,11 @@ func (kcr *kubeSystemReconciler) setOwnerReferenceToSecrets(ctx context.Context,
ownerRef := metav1.NewControllerRef(&owner, corev1.SchemeGroupVersion.WithKind("Namespace"))
ownerRef.BlockOwnerDeletion = pointer.Bool(false)

for _, secret := range secretList.Items {
for _, s := range secretList.Items {
secret := s.DeepCopy()
patch := client.StrategicMergeFrom(secret.DeepCopy(), client.MergeFromWithOptimisticLock{})
secret.SetOwnerReferences(kutil.MergeOwnerReferences(secret.GetOwnerReferences(), *ownerRef))
if err := kcr.client.Patch(ctx, &secret, patch); err != nil {
if err := kcr.client.Patch(ctx, secret, patch); err != nil {
return err
}
}
Expand Down

0 comments on commit 26ab3d2

Please sign in to comment.