Skip to content

Add per-cluster deployment health signals (hasIssues, isProvisioning)#167

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:cluster-signals
Jun 5, 2026
Merged

Add per-cluster deployment health signals (hasIssues, isProvisioning)#167
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:cluster-signals

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

The /capiclusters and /sveltosclusters endpoints now include two new boolean fields on each cluster:

  • hasIssues — true when at least one ClusterSummary has a feature in Failed or FailedNonRetriable state, or in Provisioning state with a non-empty failure message. The latter covers the Sveltos retry cycle where a retriable error moves status back to Provisioning without clearing the failure message; the message is only reset when the feature reaches Provisioned.
  • isProvisioning — true when at least one ClusterSummary is actively deploying (clean Provisioning with no failure message) or waiting for a dependency (status.dependencies non-empty). Always false when hasIssues is true, so the two signals are mutually exclusive from the consumer's perspective.

Both signals are maintained as secondary in-memory indexes (clusterWithIssues and clusterProvisioning, each a map[string]*libsveltosset.Set) updated by the existing ClusterSummary watcher. No per-request scanning — each cluster lookup is O(1). Entries are created lazily and deleted when the set empties, keeping memory cost proportional to clusters with active state rather than total ClusterSummary count.

The /capiclusters and /sveltosclusters endpoints now include two new boolean
fields on each cluster:

- hasIssues — true when at least one ClusterSummary has a feature in Failed or FailedNonRetriable
state, or in Provisioning state with a non-empty failure message. The latter covers the Sveltos
retry cycle where a retriable error moves status back to Provisioning without clearing the failure
message; the message is only reset when the feature reaches Provisioned.
- isProvisioning — true when at least one ClusterSummary is actively deploying (clean Provisioning
with no failure message) or waiting for a dependency (status.dependencies non-empty). Always false
when hasIssues is true, so the two signals are mutually exclusive from the consumer's perspective.

Both signals are maintained as secondary in-memory indexes (clusterWithIssues and clusterProvisioning,
each a map[string]*libsveltosset.Set) updated by the existing ClusterSummary watcher.
No per-request scanning — each cluster lookup is O(1). Entries are created lazily and deleted when the
set empties, keeping memory cost proportional to clusters with active state rather than total ClusterSummary
count.
@gianlucam76
gianlucam76 merged commit 3a58c6e into projectsveltos:main Jun 5, 2026
3 checks passed
@gianlucam76
gianlucam76 deleted the cluster-signals branch June 5, 2026 12:02
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