Skip to content

Commit

Permalink
fix cleanup status
Browse files Browse the repository at this point in the history
  • Loading branch information
kkb0318 committed Jul 18, 2024
1 parent de5d43f commit 77e3f52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/v1alpha1/irsa_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func setStatusServiceAccounts(s *StatusServiceAccountList, namespacedName types.

func removeStatusServiceAccounts(s *StatusServiceAccountList, namespacedName types.NamespacedName) {
if s.IsExist(namespacedName) {
s.Append(namespacedName)
s.Delete(namespacedName)
}
}

Expand Down
2 changes: 1 addition & 1 deletion internal/controller/irsa_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (r *IRSAReconciler) reconcile(ctx context.Context, obj *irsav1alpha1.IRSA,
kubeClient,
utils.DiffNamespacedNames(obj.Status.ServiceNamespacedNameList(), serviceAccount.NamespacedNameList()),
)
*obj = irsav1alpha1.IRSAStatusSetServiceAccount(*obj, deleted)
*obj = irsav1alpha1.IRSAStatusRemoveServiceAccount(*obj, deleted)
if err != nil {
e = err
reason = irsav1alpha1.IRSAReasonFailedK8sCleanUp
Expand Down

0 comments on commit 77e3f52

Please sign in to comment.