Skip to content

feature: implement cleanup of left over resources after Shard CR gets deleted #125

@MuneebAijaz

Description

@MuneebAijaz

Feature Description

Deleting the Shard CR doesn't clean up resources and pods spam error logs trying to reach the old Shards.

Frontproxy pod logs

E1202 11:39:04.063858 1 reflector.go:200] "Failed to watch" err="failed to list *v1alpha1.LogicalCluster: Get \"https://alpha-shard-kcp.kcp-config.svc.cluster.local:6443/clusters/%2A/apis/core.kcp.io/v1alpha1/logicalclusters?limit=500&resourceVersion=0\": dial tcp: lookup alpha-shard-kcp.kcp-config.svc.cluster.local on 172.30.0.10:53: no such host" logger="UnhandledError" reflector="k8s.io/[email protected]/tools/cache/reflector.go:285" type="*v1alpha1.LogicalCluster"

E1202 11:39:09.432653 1 reflector.go:200] "Failed to watch" err="failed to list *v1alpha1.WorkspaceAuthenticationConfiguration: Get \"https://alpha-shard-kcp.kcp-config.svc.cluster.local:6443/clusters/%2A/apis/tenancy.kcp.io/v1alpha1/workspaceauthenticationconfigurations?limit=500&resourceVersion=0\": dial tcp: lookup alpha-shard-kcp.kcp-config.svc.cluster.local on 172.30.0.10:53: no such host" logger="UnhandledError" reflector="k8s.io/[email protected]/tools/cache/reflector.go:285" type="*v1alpha1.WorkspaceAuthenticationConfiguration"

E1202 11:39:11.486325 1 reflector.go:200] "Failed to watch" err="failed to list *v1alpha1.Workspace: Get \"https://alpha-shard-kcp.kcp-config.svc.cluster.local:6443/clusters/%2A/apis/tenancy.kcp.io/v1alpha1/workspaces?limit=500&resourceVersion=0\": dial tcp: lookup alpha-shard-kcp.kcp-config.svc.cluster.local on 172.30.0.10:53: no such host" logger="UnhandledError" reflector="k8s.io/[email protected]/tools/cache/reflector.go:285" type="*v1alpha1.Workspac

and the same log spam is also in root proxy pods

Proposed Solution

Cleanup of all resources which were created at the time of setting up Shard by the operator.

Alternative Solutions

Manual deletion of shards
Using Crossplane to cleanup shards from kcp when shard CR gets deleted

Want to contribute?

  • I would like to work on this issue.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions