Skip to content

Tier change - #1837

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:tier-change
Jun 17, 2026
Merged

gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:tier-change

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

When a ClusterProfile's tier is raised above a challenger's tier, the challenger (stuck in FailedNonRetriable) was never woken up and never took over management of the chart. The root cause was a gap in the conflict-resolution path. Once a profile was managing a chart, its tier was never compared against other conflicting profiles on subsequent reconciliations. CanManageChart returned true immediately for the current manager, so determineChartOwnership was never called and no tier comparison ran.

This PR fixes. When a ClusterSummary is reconciled, even if that profile is already managing the chart, its tier is compared with all other profiles trying to managed same chart.

Tests

  • Unit tests for requeueLowerTierChallengers: verifies a lower-tier challenger is requeued (status reset to Provisioning) and a higher-tier challenger is left untouched.
  • Extended test/fv/tier_test.go: after profile2 takes over kyverno by dropping to tier 50, raises it back to 100 and verifies profile1 (tier 90) reclaims the chart and profile2 enters conflict.

Fixes #1836

When a ClusterProfile's tier is raised above a challenger's tier, the challenger
(stuck in FailedNonRetriable) was never woken up and never took over management of the chart.
The root cause was a gap in the conflict-resolution path. Once a profile was managing a chart,
its tier was never compared against other conflicting profiles on subsequent reconciliations.
CanManageChart returned true immediately for the current manager, so determineChartOwnership
was never called and no tier comparison ran.

This PR fixes. When a ClusterSummary is reconciled, even if that profile is already managing
the chart, its tier is compared with all other profiles trying to managed same chart.

Tests

- Unit tests for requeueLowerTierChallengers: verifies a lower-tier challenger is requeued
(status reset to Provisioning) and a higher-tier challenger is left untouched.
- Extended test/fv/tier_test.go: after profile2 takes over kyverno by dropping to tier 50,
raises it back to 100 and verifies profile1 (tier 90) reclaims the chart and profile2 enters conflict.
@gianlucam76
gianlucam76 merged commit 702c76a into projectsveltos:main Jun 17, 2026
9 checks passed
@gianlucam76
gianlucam76 deleted the tier-change branch June 17, 2026 14:06
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.

BUG: tier value not respected

1 participant