Skip to content

feat: Report per-cluster rollout state in GET /profile - #198

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:profile-rollout-state
Oct 23, 2026
Merged

gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:profile-rollout-state

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

When a profile sets maxUpdate, only that many clusters are updated at a time. The other matching clusters are queued and still run the previous configuration. GET /profile returned only the deployment status from each cluster's current ClusterSummary, so a queued cluster looked provisioned and the dashboard could not tell the clusters apart.

This adds the rollout state to the response.

Each entry in matchingClusters gets an optional rolloutState:

  • updated: the cluster has the latest version of the profile
  • updating: the latest version is being deployed to the cluster
  • waiting: the cluster is queued because maxUpdate is reached
  • paused: the cluster is paused, the rollout skips it
  • notReady: the cluster is not ready to be configured, the rollout skips it

The state comes from Status.UpdatedClusters and Status.UpdatingClusters of the ClusterProfile or Profile. Paused and ready come from the cluster cache the manager already keeps, so the change adds no API calls. A paused cluster is reported as paused even if it appears in one of the lists, since it will not be updated. notReady is only reported for a cluster that would otherwise be waiting.

The response also gets a rollout summary with the number of clusters per state and the resolved maxUpdate (a percentage is applied to the number of matching clusters and rounded up, as the profile controller does). It is only present while a rollout is pending, that is, while one of the two lists is not empty. The profile controller resets both lists once every matching cluster is synced, so neither field is reported for a settled profile. A paused cluster still gets rolloutState paused in that case.

Existing fields are unchanged. The new ones are omitted when empty.

When a profile sets maxUpdate, only that many clusters are updated at a time.
The other matching clusters are queued and still run the previous configuration.
GET /profile returned only the deployment status from each cluster's current
ClusterSummary, so a queued cluster looked provisioned and the dashboard could
not tell the clusters apart.

This adds the rollout state to the response.

Each entry in matchingClusters gets an optional rolloutState:

- updated: the cluster has the latest version of the profile
- updating: the latest version is being deployed to the cluster
- waiting: the cluster is queued because maxUpdate is reached
- paused: the cluster is paused, the rollout skips it
- notReady: the cluster is not ready to be configured, the rollout skips it

The state comes from Status.UpdatedClusters and Status.UpdatingClusters of the
ClusterProfile or Profile. Paused and ready come from the cluster cache the
manager already keeps, so the change adds no API calls. A paused cluster is
reported as paused even if it appears in one of the lists, since it will not be
updated. notReady is only reported for a cluster that would otherwise be waiting.

The response also gets a rollout summary with the number of clusters per state
and the resolved maxUpdate (a percentage is applied to the number of matching
clusters and rounded up, as the profile controller does). It is only present
while a rollout is pending, that is, while one of the two lists is not empty.
The profile controller resets both lists once every matching cluster is synced,
so neither field is reported for a settled profile. A paused cluster still gets
rolloutState paused in that case.

Existing fields are unchanged. The new ones are omitted when empty.
@gianlucam76
gianlucam76 merged commit cb6820c into projectsveltos:main Oct 23, 2026
5 checks passed
@gianlucam76
gianlucam76 deleted the profile-rollout-state branch October 23, 2026 15:30
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.

1 participant