Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions controller/appcontroller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ func TestAutoSync(t *testing.T) {
func TestAutoSyncEnabledSetToTrue(t *testing.T) {
app := newFakeApp()
enable := true
app.Spec.SyncPolicy.Automated = &v1alpha1.SyncPolicyAutomated{Enable: &enable}
app.Spec.SyncPolicy.Automated = &v1alpha1.SyncPolicyAutomated{Enabled: &enable}
ctrl := newFakeController(&fakeData{apps: []runtime.Object{app}}, nil)
syncStatus := v1alpha1.SyncStatus{
Status: v1alpha1.SyncStatusCodeOutOfSync,
Expand Down Expand Up @@ -733,7 +733,7 @@ func TestSkipAutoSync(t *testing.T) {
t.Run("AutoSyncEnableFieldIsSetFalse", func(t *testing.T) {
app := newFakeApp()
enable := false
app.Spec.SyncPolicy.Automated = &v1alpha1.SyncPolicyAutomated{Enable: &enable}
app.Spec.SyncPolicy.Automated = &v1alpha1.SyncPolicyAutomated{Enabled: &enable}
ctrl := newFakeController(&fakeData{apps: []runtime.Object{app}}, nil)
syncStatus := v1alpha1.SyncStatus{
Status: v1alpha1.SyncStatusCodeOutOfSync,
Expand Down
6 changes: 3 additions & 3 deletions docs/user-guide/auto_sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ spec:
syncPolicy:
automated: {}
```
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.
Application CRD now also support explicitly setting automated sync to be turn on or off by using `spec.syncPolicy.automated.enabled` 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.
```yaml
spec:
syncPolicy:
automated:
enable: true
enabled: true
```

!!!note
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.
Setting `spec.syncPolicy.automated.enabled` flag to null will be treated as automated sync as enabled. When using `enabled` field set to false, fields like `prune`, `self-heal` and `allowEmpty` can be set without enabling them.

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

Expand Down
50 changes: 25 additions & 25 deletions manifests/core-install-with-hydrator.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading