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

Status.Ready #210

Merged
merged 1 commit into from
Jul 22, 2024
Merged

Status.Ready #210

merged 1 commit into from
Jul 22, 2024

Conversation

gianlucam76
Copy link
Member

@gianlucam76 gianlucam76 commented Jul 22, 2024

Status.Ready will be set to true first time sveltoscluster controller can reach the managed cluster.
Once set to true, Status.Ready will never be set to false again.

If an error occurs connecting to the managed cluster, the error will be reported in the Status.FailureMessage field and Status.Ready will continue to stay set to true.

For instance

  status:
    failureMessage: 'failed to get API group resources: unable to retrieve the complete
      list of server APIs: v1: Get "https://212.2.243.209:6443/api/v1": dial tcp 212.2.243.209:6443:
      i/o timeout'
    ready: true
    version: v1.29.2+k3s1

This means Ready indicates that at least once the cluster was reachable.

Before this PR a temporary network connectivity issue had bad effect:

  1. Sveltoscluster controller could not temporarily reach the managed cluster => set Status.Ready to false
  2. Sveltos addon-controller reacted a Ready=false cluster by considering it a non match => all clusterSummaries corresponding to such a cluster deleted
  3. A deleted ClusterSummary removes all deployed add-ons and applications from the cluster

With this PR, above does not happen anymore.
A temporary network connectivity issue simply causes SveltoCluster controller to set FailureMessage. No more point 2 and 3.

Closes #209

Status.Ready will be set to true first time sveltoscluster controller
can reach the managed cluster.
Once set to true, `Status.Ready` will never be set to false again.

If an error occurs connecting to the managed cluster, the error will
be reported in the `Status.FailureMessage` field and `Status.Ready` will
continue to stay set to true.

For instance

```
  status:
    failureMessage: 'failed to get API group resources: unable to retrieve the complete
      list of server APIs: v1: Get "https://212.2.243.209:6443/api/v1": dial tcp 212.2.243.209:6443:
      i/o timeout'
    ready: true
    version: v1.29.2+k3s1
```

This means Ready indicates that at least once the cluster was reachable.

Before this PR a temporary network connectivity issue had bad effect:

1. Sveltoscluster controller could not temporarily reach the managed cluster =>
set Status.Ready to false
2. Sveltos addon-controller reacted a Ready=false cluster by considering it
a non match => all clusterSummaries corresponding to such a cluster deleted
3. A deleted ClusterSummary removes all deployed add-ons and applications from
the cluster

With this PR, above does not happen anymore.
A temporary network connectivity issue simply causes SveltoCluster controller
to set `FailureMessage`. No more point 2 and 3.
@gianlucam76 gianlucam76 merged commit 85f7480 into projectsveltos:main Jul 22, 2024
6 checks passed
@gianlucam76 gianlucam76 deleted the ready branch July 22, 2024 06:56
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: change the meaning of ready for SveltosCluster
1 participant