Skip to content

Commit 36510cf

Browse files
committed
update doc and unit test
Signed-off-by: Anand Kumar Singh <[email protected]>
1 parent c9d4963 commit 36510cf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

controller/appcontroller_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ func TestSkipAutoSync(t *testing.T) {
732732
// Verify we skip when auto-sync is disabled
733733
t.Run("AutoSyncEnableFieldIsSetFalse", func(t *testing.T) {
734734
app := newFakeApp()
735-
enable := true
735+
enable := false
736736
app.Spec.SyncPolicy.Automated = &v1alpha1.SyncPolicyAutomated{Enable: &enable}
737737
ctrl := newFakeController(&fakeData{apps: []runtime.Object{app}}, nil)
738738
syncStatus := v1alpha1.SyncStatus{

docs/user-guide/auto_sync.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
syncPolicy:
1919
automated: {}
2020
```
21-
Application CRD now also support explicitly setting automated sync to be turn on or off by using `spec.syncPolicy.automated.enable` flag to true or false
21+
Application CRD now also support explicitly setting automated sync to be turn on or off by using `spec.syncPolicy.automated.enable` flag to true or false. When `enable` field is set to true, Automated Sync is active and when set to false controller will skip automated sync even if `prune`, `self-heal` and `allowEmpty` are set.
2222
```yaml
2323
spec:
2424
syncPolicy:
@@ -27,7 +27,7 @@ spec:
2727
```
2828

2929
!!!note
30-
**Note:** Setting `spec.syncPolicy.automated.enable` flag to null will be treated as automated sync as enabled.
30+
Setting `spec.syncPolicy.automated.enable` flag to null will be treated as automated sync as enabled. When using `enable` field set to false, fields like `prune`, `self-heal` and `allowEmpty` can be set without enabling them.
3131

3232
## Temporarily toggling auto-sync for applications managed by ApplicationSets
3333

0 commit comments

Comments
 (0)