Cluster sync adj in p&a flavour#1814
Cluster sync adj in p&a flavour#1814M4KIF wants to merge 1 commit intofeature/database-controllersfrom
Conversation
|
CLA Assistant Lite bot: I have read the CLA Document and I hereby sign the CLA 2 out of 5 committers have signed the CLA. |
| CNPG cluster | ||
| Poolers | ||
| Access resources (configmap and secret) | ||
| And all of them needs to be set to Ready for our PostgresCluster phase to become Ready? |
| rewrite to consider taking state of other objects into account | ||
| before declaring readyness. | ||
|
|
||
| CNPG cluster |
There was a problem hiding this comment.
Correct me if I'm wrong, but what I'm missing in the code is checking if CNPG cluster is ready and if yes then updating our ClusterReady condition to true, so at the end (here) we can check if all conditions are true and set whole custom resource status ready to true
There was a problem hiding this comment.
Currently? Yes, currently It's mostly a scaffolding to which I will place any business logic.
| } | ||
| return ctrl.Result{}, patchErr | ||
| default: | ||
| if statusErr := updateStatus(clusterReady, metav1.ConditionFalse, reasonClusterBuildSucceeded, |
There was a problem hiding this comment.
Here we are updating the status with clusterReady condition False if we patched CNPG Cluster and requeue.
Shouldnt we in the next reconciliation go again to this check again if CNPG cluster is in desired state:
!equality.Semantic.DeepEqual(currentNormalized, desiredNormalized)and if it is (we are not going inside this if), set the clusterReady condition to true?
Something like:
statusErr := updateStatus(clusterReady, metav1.ConditionTrue...just after this big if block?
Maybe one more CNPG cluster check is needed, just to be sure it's in healthy and ready state, if not then requeue or leave with error?
There was a problem hiding this comment.
actually after thinking about it, it should be probably after reconcileManagedRoles as it's the last thing we are doing with CNPG cluster.
There was a problem hiding this comment.
In general I think It's a bit misleading that we do cluster ready and condtion == false. At least for me, It should be sth like ClusterErrorRetry, like http codes.
There was a problem hiding this comment.
Sorry I think I don't not fully understand that. By cluster do you mean our PostgresClusterCR or Cluster Ready condition (actual CNPG cluster)?
Description
everyone!!!!!
Key Changes
Highlight the updates in specific files
Testing and Verification
How did you test these changes? What automated tests are added?
Related Issues
Jira tickets, GitHub issues, Support tickets...
PR Checklist