Skip to content

Commit fe347e3

Browse files
authored
fix: update field name from syncPolicy.automated.enable to enabled (argoproj#22440)
Signed-off-by: Anand Kumar Singh <[email protected]>
1 parent d171179 commit fe347e3

13 files changed

+663
-663
lines changed

controller/appcontroller_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ func TestAutoSync(t *testing.T) {
605605
func TestAutoSyncEnabledSetToTrue(t *testing.T) {
606606
app := newFakeApp()
607607
enable := true
608-
app.Spec.SyncPolicy.Automated = &v1alpha1.SyncPolicyAutomated{Enable: &enable}
608+
app.Spec.SyncPolicy.Automated = &v1alpha1.SyncPolicyAutomated{Enabled: &enable}
609609
ctrl := newFakeController(&fakeData{apps: []runtime.Object{app}}, nil)
610610
syncStatus := v1alpha1.SyncStatus{
611611
Status: v1alpha1.SyncStatusCodeOutOfSync,
@@ -733,7 +733,7 @@ func TestSkipAutoSync(t *testing.T) {
733733
t.Run("AutoSyncEnableFieldIsSetFalse", func(t *testing.T) {
734734
app := newFakeApp()
735735
enable := false
736-
app.Spec.SyncPolicy.Automated = &v1alpha1.SyncPolicyAutomated{Enable: &enable}
736+
app.Spec.SyncPolicy.Automated = &v1alpha1.SyncPolicyAutomated{Enabled: &enable}
737737
ctrl := newFakeController(&fakeData{apps: []runtime.Object{app}}, nil)
738738
syncStatus := v1alpha1.SyncStatus{
739739
Status: v1alpha1.SyncStatusCodeOutOfSync,

docs/user-guide/auto_sync.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ 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. 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.
21+
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.
2222
```yaml
2323
spec:
2424
syncPolicy:
2525
automated:
26-
enable: true
26+
enabled: true
2727
```
2828

2929
!!!note
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.
30+
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.
3131

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

manifests/core-install-with-hydrator.yaml

+25-25
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)