Skip to content

Commit f6a8364

Browse files
committed
Update documentation, add new test for default
1 parent 8bc1830 commit f6a8364

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

doc/ansible/user-guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ expects this mapping file in a predefined location: `/opt/ansible/watches.yaml`
8181
field is mutually exclusive with the "role" field.
8282
* **reconcilePeriod** (optional): The reconciliation interval, how often the
8383
role/playbook is run, for a given CR.
84-
* **manageStatus** (optional): Specifies who is managing the status for the CR.
85-
Set to `false` when you want the role/playbook to be solely responsible for
86-
the CR's status.
84+
* **manageStatus** (optional): When true (default), the operator will manage
85+
the status of the CR generically. Set to false, the status of the CR is
86+
managed elsewhere, the specified role/playbook or in a separate controller.
8787

8888
An example Watches file:
8989

pkg/ansible/runner/runner_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,19 @@ func TestNewFromWatches(t *testing.T) {
153153
Path: validTemplate.ValidPlaybook,
154154
reconcilePeriod: &zeroSeconds,
155155
},
156+
schema.GroupVersionKind{
157+
Version: "v1alpha1",
158+
Group: "app.example.com",
159+
Kind: "DefaultStatus",
160+
}: runner{
161+
GVK: schema.GroupVersionKind{
162+
Version: "v1alpha1",
163+
Group: "app.example.com",
164+
Kind: "DefaultStatus",
165+
},
166+
Path: validTemplate.ValidPlaybook,
167+
manageStatus: true,
168+
},
156169
schema.GroupVersionKind{
157170
Version: "v1alpha1",
158171
Group: "app.example.com",

pkg/ansible/runner/testdata/valid.yaml.tmpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
kind: NoReconcile
1919
playbook: {{ .ValidPlaybook }}
2020
reconcilePeriod: 0s
21+
- version: v1alpha1
22+
group: app.example.com
23+
kind: DefaultStatus
24+
playbook: {{ .ValidPlaybook }}
2125
- version: v1alpha1
2226
group: app.example.com
2327
kind: DisableStatus

0 commit comments

Comments
 (0)