Remove Secret leftover checks at lifecycle test
Depending on the CNAO version the Secret has different annotations and
sometimes they are removed and sometimes not, this change just remove
the check since Secret is something managed by kube-admission-webhook
and not CNAO.
@@ -196,14 +196,6 @@ func CheckForLeftoverObjects(currentVersion string) {
Expect(err).NotTo(HaveOccurred())
Expect(namespaces.Items).To(BeEmpty(), "Found leftover objects from the previous operator version")
- secrets := corev1.SecretList{}
- err = framework.Global.Client.List(context.Background(), &secrets, &listOptions)
- Expect(err).NotTo(HaveOccurred())
- for _, secret := range secrets.Items {
- _, ok := secret.GetAnnotations()[names.REJECT_OWNER_ANNOTATION]
- Expect(ok).To(BeTrue(), "Found leftover secret objects from the previous operator version")
- }
-
clusterRoles := rbacv1.ClusterRoleList{}
err = framework.Global.Client.List(context.Background(), &clusterRoles, &listOptions)
Expect(err).NotTo(HaveOccurred())
