Commit 217e659 1 parent 8e52492 commit 217e659 Copy full SHA for 217e659
File tree 1 file changed +50
-0
lines changed
1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -1306,6 +1306,56 @@ spec:
1306
1306
value: disabled
1307
1307
` ` `
1308
1308
1309
+ **Note:** For some charts, we have observed the drift detection feature can detect spurious
1310
+ changes due to Helm not properly patching an object, which seems to be related to
1311
+ [Helm#5915](https://github.com/helm/helm/issues/5915) and issues alike. In this case (and
1312
+ when possible for your workload), configuring `.spec.upgrade.force` to `true` might be a
1313
+ more fitting solution than ignoring the object in full.
1314
+
1315
+ # ### Drift exclusion example Prometheus Stack
1316
+
1317
+ ` ` ` yaml
1318
+ ---
1319
+ apiVersion: helm.toolkit.fluxcd.io/v2beta1
1320
+ kind: HelmRelease
1321
+ metadata:
1322
+ name: kube-prometheus-stack
1323
+ spec:
1324
+ interval: 5m
1325
+ chart:
1326
+ spec:
1327
+ version: "45.x"
1328
+ chart: kube-prometheus-stack
1329
+ sourceRef:
1330
+ kind: HelmRepository
1331
+ name: prometheus-community
1332
+ interval: 60m
1333
+ upgrade:
1334
+ crds: CreateReplace
1335
+ # Force recreation due to Helm not properly patching Deployment with e.g. added port,
1336
+ # causing spurious drift detection.
1337
+ force: true
1338
+ postRenderers:
1339
+ - kustomize:
1340
+ patches:
1341
+ - target:
1342
+ # Ignore these objects from Flux diff as they are mutated from chart hooks
1343
+ kind: (ValidatingWebhookConfiguration|MutatingWebhookConfiguration)
1344
+ name: kube-prometheus-stack-admission
1345
+ patch: |
1346
+ - op: add
1347
+ path: /metadata/annotations/helm.toolkit.fluxcd.io~1diff
1348
+ value: disabled
1349
+ - target:
1350
+ # Ignore these objects from Flux diff as they are mutated at apply time but not
1351
+ # at dry-run time
1352
+ kind: PrometheusRule
1353
+ patch: |
1354
+ - op: add
1355
+ path: /metadata/annotations/helm.toolkit.fluxcd.io~1diff
1356
+ value: disabled
1357
+ ` ` `
1358
+
1309
1359
# # Status
1310
1360
1311
1361
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