diff --git a/e2e/testcases/custom_resources_test.go b/e2e/testcases/custom_resources_test.go index ea2ed9cf2..895ba8a0d 100644 --- a/e2e/testcases/custom_resources_test.go +++ b/e2e/testcases/custom_resources_test.go @@ -29,8 +29,10 @@ import ( "kpt.dev/configsync/e2e/nomostest/testpredicates" "kpt.dev/configsync/e2e/nomostest/testwatcher" "kpt.dev/configsync/pkg/api/configsync" + "kpt.dev/configsync/pkg/api/configsync/v1beta1" "kpt.dev/configsync/pkg/core/k8sobjects" "kpt.dev/configsync/pkg/kinds" + "kpt.dev/configsync/pkg/reconcilermanager" "kpt.dev/configsync/pkg/status" "kpt.dev/configsync/pkg/webhook/configuration" kstatus "sigs.k8s.io/cli-utils/pkg/kstatus/status" @@ -56,6 +58,14 @@ func TestCRDDeleteBeforeRemoveCustomResourceV1(t *testing.T) { nt.T.Fatal(err) } + nt.T.Log("Increase log level of reconciler to help debug failures") + rs := nomostest.RootSyncObjectV1Beta1FromRootRepo(nt, configsync.RootSyncName) + rs.Spec.SafeOverride().LogLevels = []v1beta1.ContainerLogLevelOverride{ + {ContainerName: reconcilermanager.Reconciler, LogLevel: 5}, + } + nt.Must(nt.KubeClient.Apply(rs)) + nt.Must(nt.Watcher.WatchForCurrentStatus(kinds.RootSyncV1Beta1(), configsync.RootSyncName, configsync.ControllerNamespace)) + nsObj := k8sobjects.NamespaceObject("foo") nt.Must(nt.RootRepos[configsync.RootSyncName].Add("acme/namespaces/foo/ns.yaml", nsObj)) anvilObj := anvilCR("v1", "heavy", 10)