Skip to content

Commit

Permalink
Merge pull request #178 from gibizer/namespace-delete
Browse files Browse the repository at this point in the history
[DNSMasq]Check delete before creating ServiceAccount
  • Loading branch information
openshift-merge-bot[bot] authored Feb 19, 2024
2 parents 4fef7af + c3054ae commit de4c66c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions controllers/network/dnsmasq_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ func (r *DNSMasqReconciler) Reconcile(ctx context.Context, req ctrl.Request) (re
instance.Status.Hash = map[string]string{}
}

// Handle service delete
if !instance.DeletionTimestamp.IsZero() {
return r.reconcileDelete(ctx, instance, helper)
}

// Service account, role, binding
rbacRules := []rbacv1.PolicyRule{
{
Expand All @@ -186,11 +191,6 @@ func (r *DNSMasqReconciler) Reconcile(ctx context.Context, req ctrl.Request) (re
return rbacResult, nil
}

// Handle service delete
if !instance.DeletionTimestamp.IsZero() {
return r.reconcileDelete(ctx, instance, helper)
}

// Handle non-deleted clusters
return r.reconcileNormal(ctx, instance, helper)
}
Expand Down

0 comments on commit de4c66c

Please sign in to comment.