diff --git a/e2e/pkg/fixtures/manager.go b/e2e/pkg/fixtures/manager.go index 8c32b30..1c2096c 100644 --- a/e2e/pkg/fixtures/manager.go +++ b/e2e/pkg/fixtures/manager.go @@ -7,6 +7,7 @@ import ( corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/klog/v2" utilpointer "k8s.io/utils/pointer" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -52,7 +53,7 @@ func DeleteManager(ctx context.Context, k8sClient client.Client, ns, name string Namespace: ns, }, }); err != nil { - return err + klog.Error(err) } if err := k8sClient.Delete(ctx, &rbacv1.RoleBinding{ ObjectMeta: metav1.ObjectMeta{ @@ -60,7 +61,7 @@ func DeleteManager(ctx context.Context, k8sClient client.Client, ns, name string Namespace: ns, }, }); err != nil { - return err + klog.Error(err) } if err := k8sClient.Delete(ctx, &rbacv1.Role{ ObjectMeta: metav1.ObjectMeta{ @@ -68,21 +69,21 @@ func DeleteManager(ctx context.Context, k8sClient client.Client, ns, name string Namespace: ns, }, }); err != nil { - return err + klog.Error(err) } if err := k8sClient.Delete(ctx, &rbacv1.ClusterRoleBinding{ ObjectMeta: metav1.ObjectMeta{ Name: roleName, }, }); err != nil { - return err + klog.Error(err) } if err := k8sClient.Delete(ctx, &rbacv1.ClusterRole{ ObjectMeta: metav1.ObjectMeta{ Name: roleName, }, }); err != nil { - return err + klog.Error(err) } if err := k8sClient.Delete(ctx, &corev1.ServiceAccount{ ObjectMeta: metav1.ObjectMeta{ @@ -90,7 +91,7 @@ func DeleteManager(ctx context.Context, k8sClient client.Client, ns, name string Namespace: ns, }, }); err != nil { - return err + klog.Error(err) } return nil @@ -140,15 +141,15 @@ func role(name string) *rbacv1.ClusterRole { } } -func clusterRoleBinding(ns, name, role string) *rbacv1.ClusterRoleBinding { +func clusterRoleBinding(ns, SAName, role string) *rbacv1.ClusterRoleBinding { return &rbacv1.ClusterRoleBinding{ ObjectMeta: metav1.ObjectMeta{ - Name: name, + Name: role, }, Subjects: []rbacv1.Subject{ { Kind: "ServiceAccount", - Name: name, + Name: SAName, Namespace: ns, }, }, diff --git a/e2e/pkg/fixtures/rollout.go b/e2e/pkg/fixtures/rollout.go index 367e21e..7f0db5a 100644 --- a/e2e/pkg/fixtures/rollout.go +++ b/e2e/pkg/fixtures/rollout.go @@ -6,6 +6,7 @@ import ( argorolloutsapiv1alpha1 "github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/klog/v2" utilpointer "k8s.io/utils/pointer" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -77,7 +78,7 @@ func DeleteRollout(ctx context.Context, k8sClient client.Client, ns, name string Namespace: ns, }, }); err != nil { - return err + klog.Error(err) } if err := k8sClient.Delete(ctx, &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ @@ -85,7 +86,7 @@ func DeleteRollout(ctx context.Context, k8sClient client.Client, ns, name string Namespace: ns, }, }); err != nil { - return err + klog.Error(err) } if err := k8sClient.Delete(ctx, &argorolloutsapiv1alpha1.Rollout{ ObjectMeta: metav1.ObjectMeta{ @@ -93,7 +94,7 @@ func DeleteRollout(ctx context.Context, k8sClient client.Client, ns, name string Namespace: ns, }, }); err != nil { - return err + klog.Error(err) } return nil }