Skip to content

Commit eccd240

Browse files
authored
Add successful condition for Ansible-based operators (#5262)
* Add and set successful condition, never remove conditions Signed-off-by: Fabian von Feilitzsch <[email protected]>
1 parent 76c1a4a commit eccd240

File tree

16 files changed

+101
-45
lines changed

16 files changed

+101
-45
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
entries:
2+
- description: >
3+
For Ansible-based Operators, adds documented `Successful` condition, and no longer
4+
removes conditions from the status in updates. Users can now wait for a successful
5+
reconciliation by waiting for the `Successful` type condition to be `True`.
6+
7+
kind: "bugfix"
8+
breaking: false

hack/generate/samples/internal/ansible/constants.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ const moleculeTaskFragment = `- name: Load CR
6969
wait: yes
7070
wait_timeout: 300
7171
wait_condition:
72-
type: Running
73-
reason: Successful
72+
type: Successful
7473
status: "True"
7574
7675
- name: Wait 2 minutes for memcached deployment
@@ -259,8 +258,7 @@ const originaMemcachedMoleculeTask = `- name: Create the cache.example.com/v1alp
259258
wait: yes
260259
wait_timeout: 300
261260
wait_condition:
262-
type: Running
263-
reason: Successful
261+
type: Successful
264262
status: "True"
265263
vars:
266264
cr_file: 'cache_v1alpha1_memcached.yaml'

hack/generate/samples/internal/ansible/testdata/tasks/argstest_test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
wait: yes
1414
wait_timeout: 300
1515
wait_condition:
16-
type: Running
17-
reason: Successful
16+
type: Successful
1817
status: "True"
1918
register: args_test
2019

hack/generate/samples/internal/ansible/testdata/tasks/casetest_test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
wait: yes
1414
wait_timeout: 300
1515
wait_condition:
16-
type: Running
17-
reason: Successful
16+
type: Successful
1817
status: "True"
1918
register: case_test
2019

hack/generate/samples/internal/ansible/testdata/tasks/clusterannotationtest_test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
wait: yes
88
wait_timeout: 300
99
wait_condition:
10-
type: Running
11-
reason: Successful
10+
type: Successful
1211
status: "True"
1312
vars:
1413
cr_file: 'test_v1alpha1_clusterannotationtest.yaml'

hack/generate/samples/internal/ansible/testdata/tasks/collectiontest_test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
wait: yes
1212
wait_timeout: 300
1313
wait_condition:
14-
type: Running
15-
reason: Successful
14+
type: Successful
1615
status: "True"
1716

1817
- name: Assert ConfigMap has been created by collection Role

hack/generate/samples/internal/ansible/testdata/tasks/inventorytest_test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
wait: yes
88
wait_timeout: 300
99
wait_condition:
10-
type: Running
11-
reason: Successful
10+
type: Successful
1211
status: "True"
1312
vars:
1413
custom_resource: "{{ lookup('template', '/'.join([

hack/generate/samples/internal/ansible/testdata/tasks/reconciliationtest_test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
wait: yes
1414
wait_timeout: 300
1515
wait_condition:
16-
type: Running
17-
reason: Successful
16+
type: Successful
1817
status: "True"
1918
register: reconciliation_test
2019
- name: Retreive the number of iterations on the ConfigMap

hack/generate/samples/internal/ansible/testdata/tasks/selectortest_test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
wait: yes
1616
wait_timeout: 300
1717
wait_condition:
18-
type: Running
19-
reason: Successful
18+
type: Successful
2019
status: "True"
2120
register: selector_test
2221

hack/generate/samples/internal/ansible/testdata/tasks/subresourcestest_test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
wait: yes
1515
wait_timeout: 300
1616
wait_condition:
17-
type: Running
18-
reason: Successful
17+
type: Successful
1918
status: "True"
2019
register: subresources_test
2120

0 commit comments

Comments
 (0)