Skip to content

Conversation

@Diaphteiros
Copy link
Contributor

What this PR does / why we need it:
Implements the MCP v2 controller.

Which issue(s) this PR fixes:
Main part of openmcp-project/backlog#210

Special notes for your reviewer:
Depends on #114 and requires it to be merged first.

Release note:

The MCPv2 controller is now part of the openmcp-operator.

Comment on lines +72 to +75
if !cr.GetDeletionTimestamp().IsZero() {
log.Debug("ClusterRequest resource already marked for deletion", "crName", crName, "namespace", cr.GetNamespace())
continue
}
Copy link
Member

Choose a reason for hiding this comment

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

Deleting a resource is idempotent so this check is not needed. But we can keep it if you think the debug message could be useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is more about the debug message than about preventing a duplicate deletion.

log.Debug("Labels on MCP namespace on platform cluster do not match expected labels, skipping deletion", "platformNamespace", ns.Name)
} else {
if !ns.DeletionTimestamp.IsZero() {
log.Debug("MCP namespace already marked for deletion", "platformNamespace", ns.Name)
Copy link
Member

Choose a reason for hiding this comment

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

Same here

remainingServiceResources := []*unstructured.Unstructured{}
for _, res := range serviceResources {
if !res.GetDeletionTimestamp().IsZero() {
log.Debug("Service resource already marked for deletion", "resourceKind", res.GetKind(), "resourceAPIVersion", res.GetAPIVersion(), "provider", providerName)
Copy link
Member

Choose a reason for hiding this comment

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

Same here

@Diaphteiros Diaphteiros merged commit 1a771c3 into main Sep 3, 2025
4 checks passed
@Diaphteiros Diaphteiros deleted the mcp-controller branch September 3, 2025 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants