kubernetes-retired / cluster-api-provider-nested

Cluster API Provider for Nested Clusters
Apache License 2.0
301 stars 67 forks source link

The informer of tenant cluster do not ternimal after the tenant cluster was deleted #162

Closed vincent-pli closed 3 years ago

vincent-pli commented 3 years ago

What steps did you take and what happened: [A clear and concise description on how to REPRODUCE the bug.] After the virtualCluster removed, we do not terminal the informers for the tenant cluster, so get tons of such error message in the cyncer's log:

E0708 02:43:16.204417       1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.21.1/tools/cache/reflector.go:167: Failed to watch *v1.Pod: failed to list *v1.Pod: Get "https://[apiserver-svc.default-ef338f-vc-sample-1]:6443/api/v1/pods?resourceVersion=264&timeout=30s": dial tcp: lookup apiserver-svc.default-ef338f-vc-sample-1 on 10.96.0.10:53: no such host
E0708 02:43:16.240855       1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.21.1/tools/cache/reflector.go:167: Failed to watch *v1.ServiceAccount: failed to list *v1.ServiceAccount: Get "https://[apiserver-svc.default-ef338f-vc-sample-1]:6443/api/v1/serviceaccounts?resourceVersion=233&timeout=30s": dial tcp: lookup apiserver-svc.default-ef338f-vc-sample-1 on 10.96.0.10:53: no such host
E0708 02:43:18.098273       1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.21.1/tools/cache/reflector.go:167: Failed to watch *v1.Namespace: failed to list *v1.Namespace: Get "https://[apiserver-svc.default-ef338f-vc-sample-1]:6443/api/v1/namespaces?resourceVersion=143&timeout=30s": dial tcp: lookup apiserver-svc.default-ef338f-vc-sample-1 on 10.96.0.10:53: no such host
E0708 02:43:19.240601       1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.21.1/tools/cache/reflector.go:167: Failed to watch *v1.Event: failed to list *v1.Event: Get "https://[apiserver-svc.default-ef338f-vc-sample-1]:6443/api/v1/events?resourceVersion=268&timeout=30s": dial tcp: lookup apiserver-svc.default-ef338f-vc-sample-1 on 10.96.0.10:53: no such host

/kind bug