Skip to content

fix: cleanup child ConfigMap propagation MCS after ClusterDeployment deletion#617

Merged
AndrejsPon00 merged 1 commit into
k0rdent:mainfrom
AndrejsPon00:cleanup-mcs
Nov 7, 2025
Merged

fix: cleanup child ConfigMap propagation MCS after ClusterDeployment deletion#617
AndrejsPon00 merged 1 commit into
k0rdent:mainfrom
AndrejsPon00:cleanup-mcs

Conversation

@AndrejsPon00
Copy link
Copy Markdown
Contributor

@AndrejsPon00 AndrejsPon00 commented Nov 7, 2025

Part of #582

Copilot AI review requested due to automatic review settings November 7, 2025 09:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a resource leak by ensuring that MultiClusterService (MCS) resources used for child ConfigMap propagation are properly cleaned up when a ClusterDeployment is deleted. The fix adds a check in the reconciliation loop to detect when a ClusterDeployment has been deleted (NotFound error) and triggers the cleanup of the associated MCS resource.

  • Adds deletion detection in the Reconcile method to handle ClusterDeployment removal
  • Renames parameter in CleanupChildConfigMapMcsPropagation for clarity
  • Ensures MCS cleanup is invoked before returning from reconciliation

Comment thread kof-operator/internal/controller/clusterdeployment_controller.go
@AndrejsPon00 AndrejsPon00 merged commit 92915e0 into k0rdent:main Nov 7, 2025
6 checks passed
@github-project-automation github-project-automation Bot moved this to Done in k0rdent Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants