Enable drift detection for cluster HelmRelease
When working on !2445 (merged), it was noticed that when we are enabling flux drift detection and correction for cluster HR, it is causing the rolling upgrade of the nodes.
For this reason, we haven't drift detection on cluster HelmRelease yet.
Every 2.0s: kubectl get machines -A ishita-drift: Mon Oct 28 12:11:34 2024
NAMESPACE NAME CLUSTER NODENAME PROVIDERID PHASE AGE VERSION
sylva-system management-cluster-control-plane-6c8mf management-cluster management-cluster-cp-61aef040e0-s7mqc openstack:///7212c9ff-a28f-4114-bc96-eeff4bd24fee Deleting 9m9s v1.29.9+rke2r1
sylva-system management-cluster-control-plane-7wzbs management-cluster management-cluster-cp-61aef040e0-9686l openstack:///72dab693-0223-42cd-8c24-33db70854a81 Running 3m35s v1.29.9+rke2r1
sylva-system management-cluster-control-plane-b9z7n management-cluster management-cluster-cp-61aef040e0-qdgbj openstack:///b520cb3c-fb4b-4429-b96a-a3798a71e028 Running 9m9s v1.29.9+rke2r1
sylva-system management-cluster-control-plane-jwdtj management-cluster management-cluster-cp-61aef040e0-5h5p4 openstack:///acfbaf82-741c-4b0f-af2e-42424152fe3a Running 9m8s v1.29.9+rke2r1
sylva-system management-cluster-md0-79stb-mpk6r management-cluster management-cluster-md0-79stb-mpk6r openstack:///9636ac69-c0bf-4bf4-844e-956046ac7ebb Running 6m13s v1.29.9+rke2r1
This happens because we are getting the following diff for cluster trigger a rolling upgrade of the nodes:
{
"level": "debug",
"ts": "2024-10-30T09:18:14.195Z",
"msg": "resource modified",
"controller": "helmrelease",
"controllerGroup": "helm.toolkit.fluxcd.io",
"controllerKind": "HelmRelease",
"HelmRelease": {
"name": "cluster",
"namespace": "sylva-system"
},
"namespace": "sylva-system",
"name": "cluster",
"reconcileID": "c52825f1-2299-4a26-a77e-be4baff9a610",
"resource": "RKE2ControlPlane/sylva-system/management-cluster-control-plane",
"patch": [
{
"value": "HTTP_PROXY=<http_proxy>",
"op": "replace",
"path": "/spec/files/9/content"
},
{
"value": "HTTP_PROXY=<https_proxy>",
"op": "replace",
"path": "/spec/files/10/content"
},
{
"value": "export NO_PROXY=<no_proxy>",
"op": "replace",
"path": "/spec/preRKE2Commands/4"
}
]
}
So for the time being, drift has been disabled for cluster HR.
We need to work to fix this behavior and enable drift detection for cluster HR.
Edited by Ishita Mittal
