Enhance CHK reconciliation and normalization features#1885
Enhance CHK reconciliation and normalization features#1885perosb wants to merge 1 commit intoAltinity:0.26.0from
Conversation
- Implement InheritClusterReconcileFrom method to inherit reconcile settings from ClickHouseKeeperInstallation. - Add prepareStsReconcileOptsWaitSection to set StatefulSet reconcile options based on readiness and startup probes. - Normalize reconcile host settings in the normalizer. - Update HostObjectsPoller to safely delete ready marks only if readyMarkDeleter is initialized. - Introduce new replacer for CHK clusters in the engine. - Extend namer functionality to handle CHK clusters. Fixes Altinity#1796 Signed-off-by: Per Osbäck <per@osbeck.com>
|
Thank you, @perosb. The next operator release (0.26) will be focused almost solely on improving Keeper support. |
| return false | ||
| } | ||
| _ = p.readyMarkDeleter.DeleteReadyMarkOnPodAndService(_ctx, host) | ||
| if p.readyMarkDeleter != nil { |
There was a problem hiding this comment.
Please check default deleter behavior
| return e.newReplacerCR(t) | ||
| case api.ICluster: | ||
| return e.newReplacerCluster(t) | ||
| case *apiChk.Cluster: |
There was a problem hiding this comment.
There is ICluster interface that covers this functionality. No need to duplicate code. If there are doubts on applicability with CHK - ensure ICluster compatibility
| }) | ||
| } | ||
|
|
||
| // newReplacerCHKCluster |
| case api.ICluster: | ||
| cluster := obj.(api.ICluster) | ||
| return n.namePartCRName(cluster.GetRuntime().GetAddress().GetNamespace()) | ||
| case *apiChk.Cluster: |
There was a problem hiding this comment.
The same - interface is for a reason
| case api.ICluster: | ||
| cluster := obj.(api.ICluster) | ||
| return n.namePartCRName(cluster.GetRuntime().GetAddress().GetCRName()) | ||
| case *apiChk.Cluster: |
There was a problem hiding this comment.
The same - interface use
| case api.ICluster: | ||
| cluster := obj.(api.ICluster) | ||
| return n.namePartClusterName(cluster.GetRuntime().GetAddress().GetClusterName()) | ||
| case *apiChk.Cluster: |
|
Labeler behavior is unclear, it is expected to be implemented via interface abstractions. |
|
this was created for 0.25 2 months ago. I will close this. |
This pull request introduces enhancements to the ClickHouse Keeper (CHK) controller logic, focusing on better inheritance and normalization of reconcile settings, improved handling of StatefulSet reconciliation, and extended macro/namer support for CHK clusters. The changes improve the maintainability and configurability of cluster reconciliation, ensuring CHK clusters inherit correct settings and are properly identified throughout the codebase.
Reconcile settings inheritance and normalization:
Cluster.InheritClusterReconcileFromto allow CHK clusters to inherit reconcile settings from the parent CR, ensuring consistent runtime and host reconciliation behavior. [1] [2]normalizeReconcileHost), improving the reliability of host-specific settings.StatefulSet reconciliation improvements:
prepareStsReconcileOptsWaitSection, enabling conditional setting ofWaitUntilStartedandWaitUntilReadyoptions for StatefulSet reconciliation based on probe readiness, with appropriate logging.Macro and namer support for CHK clusters:
*apiChk.Clusterobjects, supporting namespace, CR name, and cluster name resolution for CHK clusters. [1] [2] [3] [4] [5] [6] [7]Fixes #1796