mirror of
https://github.com/storytold/irsa-manager.git
synced 2026-10-09 00:09:43 +00:00
fix cleanup status
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user