Commit fed429b 1 parent 0212c6d commit fed429b Copy full SHA for fed429b
File tree 1 file changed +36
-0
lines changed
1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -1270,6 +1270,42 @@ spec:
1270
1270
crds: CreateReplace
1271
1271
` ` `
1272
1272
1273
+ # ## Drift detection
1274
+
1275
+ **Note:** This feature is experimental and can be enabled by setting `--feature-gates=DetectDrift=true`.
1276
+
1277
+ When a HelmRelease is in-sync with the Helm release object in the storage, the controller will
1278
+ compare the manifests from the Helm storage with the current state of the cluster using a
1279
+ [server-side dry-run apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/).
1280
+ If this comparison detects a drift (either due resource being created or modified during the
1281
+ dry-run), the controller will perform an upgrade for the release, restoring the desired state.
1282
+
1283
+ # ## Excluding resources from drift detection
1284
+
1285
+ The drift detection feature can be configured to exclude certain resources from the comparison
1286
+ by labeling or annotating them with `helm.toolkit.fluxcd.io/diff : disabled`. Using
1287
+ [post-renderers](#post-renderers), this can be applied to any resource rendered by Helm.
1288
+
1289
+ ` ` ` yaml
1290
+ apiVersion: helm.toolkit.fluxcd.io/v2beta1
1291
+ kind: HelmRelease
1292
+ metadata:
1293
+ name: app
1294
+ namespace: webapp
1295
+ spec:
1296
+ postRenderers:
1297
+ - kustomize:
1298
+ patches:
1299
+ - target:
1300
+ version: v1
1301
+ kind: Deployment
1302
+ name: my-app
1303
+ patch:
1304
+ - op: add
1305
+ path: /metadata/labels/helm.toolkit.fluxcd.io~1diff
1306
+ value: disabled
1307
+ ` ` `
1308
+
1273
1309
# # Status
1274
1310
1275
1311
When the controller completes a reconciliation, it reports the result in the status sub-resource.
You can’t perform that action at this time.
0 commit comments