-
Notifications
You must be signed in to change notification settings - Fork 22
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
Drift Detection and Correction for Cross-Cluster State Management #732
Comments
@wahabmk can you please add the most recent research results that you're running atm through sveltos docs? |
I couldn't find a way in the Sveltos docs currently that would indicate how to watch for drift changes and trigger a custom notification, so I studied the code to understand how drift detection is implemented and how we could possibly implement a notification mechanism. Sveltos Drift Detection & CorrectionThere are 2 ways to run the "drift-detection-manager" in Sveltos:
In both of these methods, the drift detection CRDs are installed in the managed cluster. The The high-level flow of how the drift correction actually happens is as below:
How we can detect drift for notificationsWe could use either the Using
|
Configuring drift detection/correction and applying it to clusters will be implemented in #834. Notification for drift is not something that Sveltos includes out of the box. The #732 (comment) describes possibles approaches we could take to implement it but need to try out as part of working on #835.
I couldn't find any mechanism in Sveltos to manually trigger drift correction. Based on how drift correction has been implemented in Sveltos (summarized in #732 (comment)), the way to manually trigger correction would be to trigger the
Currently the way labels are used to target clusters for deploying services is that the |
The options for notification or observability for detected drift is discussed in #732 (comment)
The same comment for manually triggering drift correction as in #732 (comment). |
The options for notification or observability of detected drift is discussed in #732 (comment)
Same comment for manually triggering drift correction as in #732 (comment).
If this is referring to scope of drift detection as determined by labels, then same comment applies as in the last point in #732 (comment). But if this is referring to opting certain services out of drift detection, then see the comment below.
apiVersion: hmc.mirantis.com/v1alpha1
kind: ClusterDeployment
metadata:
name: wali-dev-1
namespace: hmc-system
spec:
. . .
services:
- template: kyverno-3-2-6
name: kyverno
namespace: kyverno
- template: ingress-nginx-4-11-0
name: ingress-nginx
namespace: ingress-nginx
values: |
ignoreDrift: true
- template: cert-manager-1-16-2
name: cert-manager
namespace: cert-manager
syncMode: ContinuousWithDriftDetection
. . .
|
Goals
Problem Statement: With the completion of Cross-Cluster State Management Templates, HMC now has centralized ServiceTemplate deployment across clusters. However, without drift detection and correction, clusters risk deviating from intended configurations over time, causing inconsistency and requiring manual interventions to restore alignment.
Epic Goal: Build upon the Cross-Cluster State Management Templates by integrating automated drift detection and correction, utilizing Sveltos to ensure clusters continuously conform to centrally defined ServiceTemplates. This system will enable automated detection, reporting, and correction of configuration drift, increasing consistency and minimizing operational load.
Major deliverables
Who it benefits
Customer Business:
Platform Engineering Teams:
Mirantis:
Acceptance criteria
Assumptions
Limitations
Out of scope
User stories
As a Platform Lead:
As a Platform Engineer:
The text was updated successfully, but these errors were encountered: