Skip to content

[eno] Adding logic for force cleanup composition#564

Open
ruinan-liu wants to merge 2 commits intomainfrom
users/ruinanliu/fix-composition-stuck
Open

[eno] Adding logic for force cleanup composition#564
ruinan-liu wants to merge 2 commits intomainfrom
users/ruinanliu/fix-composition-stuck

Conversation

@ruinan-liu
Copy link
Contributor

@ruinan-liu ruinan-liu commented Feb 13, 2026

we will force remove a finalizer of a composition if and only if

  1. The composition has label "aks.azure.com/component-type":addon or the composition has label "eno.azure.io/overlaymgr-component-type":addon AND
  2. the owner symphony is gone.

@ruinan-liu ruinan-liu marked this pull request as ready for review February 13, 2026 23:22
}

// If a label is present, it must be "addon". Any non-addon value (e.g. "ccp") disqualifies.
if hasAKS && aksLabel != addOnLabelValue {
Copy link
Collaborator

Choose a reason for hiding this comment

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

hasAKS can be removed here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks Allan, I don't think we can safely remove hasAKS or hasOverlay here. Since a composition only has one of the two labels, the absent label will return "" from the map lookup. Without the guards, "" != addon and will return false even when the present label is correctly set to "addon".

However I have simplfied the helper function to only check

	return labels[AKSComponentLabel] == addOnLabelValue || labels[OverlayComponentLabel] == addOnLabelValue

Which I think is sufficient and have updated the code.
Thanks

Copy link
Contributor Author

@ruinan-liu ruinan-liu left a comment

Choose a reason for hiding this comment

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

Replied to comment

)

const (
AKSComponentLabel = "aks.azure.com/component-type"
Copy link
Collaborator

Choose a reason for hiding this comment

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

These are aks specific labels. We shouldn't hard code it in the Eno platform which is supposed to be generic.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I am thinking whether we should handle it in overlay-reconciler-synth instead of here.

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.

2 participants