Skip to content

Conversation

@graindcafe
Copy link
Contributor

Replace single status condition type with multiple ones to better reflect resource reconciliation states.

The only condition was Reconciled, this has been replaced by :

  • Available : when the resource has been correctly reconciled and can be used normally
  • Progressing : when the resource is being reconciled (creation, update or deletion)
  • Rejected : when the resource could not be created on S3 side, the resource can be safely deleted
  • Degraded : when we cannot say the status of the resource on S3 side, something went wrong on the operator or we cannot use the kubernetes API correctly

Something to note: a resource now got more than 1 Condition. The hypothesis that there was only one is no longer true (mainly on test and s3instance controller).

During reconciliation, update conditions instead of relying on explicit logs, ensuring status information is surfaced in the resource itself while still producing INFO/ERROR logs.

On reconcile.go and finalizer.go we got both logging + condition update (not always). The call to condition update will by itself write a log. As many as possible direct calls to logging were removed so that all goes through condition update (that will do the log) and send the information to Kubernetes on the resource for the users to read it.

One consequence is that messages were changed and name of the resource(s) were added to the message to not loose information.

Add condition reasons to distinguish errors originating from S3, the operator, or Kubernetes.

As says before, when the Status Condition Type == Degraded, we can say where the problem occured.

graindcafe and others added 6 commits September 23, 2025 19:45
…te with not owned secret (and fix previous commit)
- Replace single status condition type with multiple ones to better reflect
  resource reconciliation states.
- During reconciliation, update conditions instead of relying on explicit logs,
  ensuring status information is surfaced in the resource itself while still
  producing INFO/ERROR logs.
- Add condition reasons to distinguish errors originating from S3, the operator,
  or Kubernetes.
@graindcafe graindcafe marked this pull request as ready for review September 23, 2025 18:03
@graindcafe graindcafe force-pushed the better-status-condition branch from bb08087 to ff5a0fa Compare September 24, 2025 07:12
@graindcafe
Copy link
Contributor Author

@Donatien26 should I cancel this PR ?

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.

2 participants