Skip to content

Klusterlet is not deleted after deleting the managed cluster #734

@zhujian7

Description

@zhujian7

hub import controller log:

I0703 03:07:02.869142       1 helpers.go:326] Update the managed cluster import-test-l44dhl condition {ManagedClusterImportSucceeded True 0 0001-01-01 00:00:00 +0000 UTC ManagedClusterImported Import succeeded} succeeded.
I0703 03:07:02.869363       1 event_broadcaster.go:338] "Event occurred" object="import-test-l44dhl/import-test-l44dhl" kind="ManagedCluster" apiVersion="cluster.open-cluster-management.io/v1" type="Normal" reason="Imported" action="Imported" note="The import-test-l44dhl has successfully imported"
I0703 03:07:02.893246       1 event.go:377] Event(v1.ObjectReference{Kind:"Deployment", Namespace:"open-cluster-management", Name:"managedcluster-import-controller", UID:"074e1ca6-3fcd-4a87-aeee-c01fa0429777", APIVersion:"apps/v1", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'ManifestWorkUpdated' import-test-l44dhl/import-test-l44dhl-klusterlet is updated
I0703 03:07:13.068928       1 helpers.go:326] Update the managed cluster import-test-l44dhl condition {ManagedClusterImportSucceeded False 0 0001-01-01 00:00:00 +0000 UTC ManagedClusterDetaching The managed cluster is being detached now} succeeded.
I0703 03:07:13.069166       1 event_broadcaster.go:338] "Event occurred" object="import-test-l44dhl/import-test-l44dhl" kind="ManagedCluster" apiVersion="cluster.open-cluster-management.io/v1" type="Normal" reason="Detaching" action="Detaching" note="The import-test-l44dhl is currently becoming detached"
I0703 03:07:18.157447       1 event.go:377] Event(v1.ObjectReference{Kind:"Deployment", Namespace:"open-cluster-management", Name:"managedcluster-import-controller", UID:"074e1ca6-3fcd-4a87-aeee-c01fa0429777", APIVersion:"apps/v1", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'ManifestWorksForceDeleted' The manifest work import-test-l44dhl/import-test-l44dhl-klusterlet-crds is force deleted
I0703 03:07:23.134928       1 event.go:377] Event(v1.ObjectReference{Kind:"Deployment", Namespace:"open-cluster-management", Name:"managedcluster-import-controller", UID:"074e1ca6-3fcd-4a87-aeee-c01fa0429777", APIVersion:"apps/v1", ResourceVersion:"", FieldPath:""}): type: 'Warning' reason: 'ManagedClusterImportFinalizerMissed' The namespace of managed cluster import-test-l44dhl will not be deleted due to import finalizer is missed
I0703 03:07:23.159737       1 event.go:377] Event(v1.ObjectReference{Kind:"Deployment", Namespace:"open-cluster-management", Name:"managedcluster-import-controller", UID:"074e1ca6-3fcd-4a87-aeee-c01fa0429777", APIVersion:"apps/v1", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'ClusterNamespaceDeletion' cluster namespace import-test-l44dhl is deleted

managed cluster, klusterlet-agent:

I0703 03:07:53.181046       1 base_controller.go:119] Starting #10 worker of AppliedManifestWorkFinalizer controller ...
W0703 03:07:53.183441       1 reflector.go:569] k8s.io/client-go@v0.32.4/tools/cache/reflector.go:251: failed to list *v1.ManagedCluster: managedclusters.cluster.open-cluster-management.io "import-test-l44dhl" is forbidden: User "system:open-cluster-management:import-test-l44dhl:b914ce76-3945-428f-8e4a-8bc14468b790" cannot list resource "managedclusters" in API group "cluster.open-cluster-management.io" at the cluster scope
E0703 03:07:53.183493       1 reflector.go:166] "Unhandled Error" err="k8s.io/client-go@v0.32.4/tools/cache/reflector.go:251: Failed to watch *v1.ManagedCluster: failed to list *v1.ManagedCluster: managedclusters.cluster.open-cluster-management.io \"import-test-l44dhl\" is forbidden: User \"system:open-cluster-management:import-test-l44dhl:b914ce76-3945-428f-8e4a-8bc14468b790\" cannot list resource \"managedclusters\" in API group \"cluster.open-cluster-management.io\" at the cluster scope"
W0703 03:07:53.468697       1 reflector.go:569] k8s.io/client-go@v0.32.4/tools/cache/reflector.go:251: failed to list *v1alpha1.ManagedClusterAddOn: managedclusteraddons.addon.open-cluster-management.io is forbidden: User "system:open-cluster-management:import-test-l44dhl:b914ce76-3945-428f-8e4a-8bc14468b790" cannot list resource "managedclusteraddons" in API group "addon.open-cluster-management.io" in the namespace "import-test-l44dhl"
E0703 03:07:53.468737       1 reflector.go:166] "Unhandled Error" err="k8s.io/client-go@v0.32.4/tools/cache/reflector.go:251: Failed to watch *v1alpha1.ManagedClusterAddOn: failed to list *v1alpha1.ManagedClusterAddOn: managedclusteraddons.addon.open-cluster-management.io is forbidden: User \"system:open-cluster-management:import-test-l44dhl:b914ce76-3945-428f-8e4a-8bc14468b790\" cannot list resource \"managedclusteraddons\" in API group \"addon.open-cluster-management.io\" in the namespace \"import-test-l44dhl\""
W0703 03:07:53.605792       1 reflector.go:569] k8s.io/client-go@v0.32.4/tools/cache/reflector.go:251: failed to list *v1.CertificateSigningRequest: certificatesigningrequests.certificates.k8s.io is forbidden: User "system:open-cluster-management:import-test-l44dhl:b914ce76-3945-428f-8e4a-8bc14468b790" cannot list resource "certificatesigningrequests" in API group "certificates.k8s.io" at the cluster scope
E0703 03:07:53.605836       1 reflector.go:166] "Unhandled Error" err="k8s.io/client-go@v0.32.4/tools/cache/reflector.go:251: Failed to watch *v1.CertificateSigningRequest: failed to list *v1.CertificateSigningRequest: certificatesigningrequests.certificates.k8s.io is forbidden: User \"system:open-cluster-management:import-test-l44dhl:b914ce76-3945-428f-8e4a-8bc14468b790\" cannot list resource \"certificatesigningrequests\" in API group \"certificates.k8s.io\" at the cluster scope"
W0703 03:07:54.166384       1 reflector.go:569] k8s.io/client-go@v0.32.4/tools/cache/reflector.go:251: failed to list *v1.ManifestWork: manifestworks.work.open-cluster-management.io is forbidden: User "system:open-cluster-management:import-test-l44dhl:b914ce76-3945-428f-8e4a-8bc14468b790" cannot list resource "manifestworks" in API group "work.open-cluster-management.io" in the namespace "import-test-l44dhl"
E0703 03:07:54.166424       1 reflector.go:166] "Unhandled Error" err="k8s.io/client-go@v0.32.4/tools/cache/reflector.go:251: Failed to watch *v1.ManifestWork: failed to list *v1.ManifestWork: manifestworks.work.open-cluster-management.io is forbidden: User \"system:open-cluster-management:import-test-l44dhl:b914ce76-3945-428f-8e4a-8bc14468b790\" cannot list resource \"manifestworks\" in API group \"work.open-cluster-management.io\" in the namespace \"import-test-l44dhl\""
W0703 03:07:55.261037       1 reflector.go:569] k8s.io/client-go@v0.32.4/tools/cache/reflector.go:251: failed to list *v1.ManagedCluster: managedclusters.cluster.open-cluster-management.io "import-test-l44dhl" is forbidden: User "system:open-cluster-management:import-test-l44dhl:b914ce76-3945-428f-8e4a-8bc14468b790" cannot list resource "managedclusters" in API group "cluster.open-cluster-management.io" at the cluster scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions