Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSA dryrun detects changes of other controllers #6879

Closed
sbueringer opened this issue Jul 8, 2022 · 1 comment · Fixed by #6880
Closed

SSA dryrun detects changes of other controllers #6879

sbueringer opened this issue Jul 8, 2022 · 1 comment · Fixed by #6880
Assignees
Labels
area/clusterclass Issues or PRs related to clusterclass kind/bug Categorizes issue or PR as related to a bug.

Comments

@sbueringer
Copy link
Member

sbueringer commented Jul 8, 2022

I played a bit around with SSA and took a closer look at dryrun.

It looks like SSA dryrun currently detects changes made by other controllers and thus triggers SSA even when it's not necessary.

Example:

  • Topology Controller: Reconcile: getCurrentState (original)
  • KCP controller: takes ownership of additional conditions (managed fields of KCP change)
  • Topology Controller: Reconcile: reconcileState (original=>modified)
    • dryrun SSA with modified (picks up changes made by other controllers (i.e. managed field change)
    • diff between original and modified => contains diff made by other controllers (i.e. managedField changes for condition ownership)

I think we should reduce the cases where this can happen to avoid running additional SSA's and potentially even template rotations (although I'm not aware of any infra / bootstrap provider controller which reconciles templates).

I would propose optimizing this by dropping managed fields of other controllers before we diff.

Of course this doesn't catch cases where other controllers change metadata or spec and not only the managed fields.

/kind bug
/area topology
[One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels]

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. area/topology labels Jul 8, 2022
@sbueringer
Copy link
Member Author

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/clusterclass Issues or PRs related to clusterclass kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants