Skip to content

Commit 18703df

Browse files
authored
📖 Fix errors for manifestwork condition rules (open-cluster-management-io#499)
* docs(manifestwork): use manualSelector in Job example to avoid immutable field error Signed-off-by: zhujian <[email protected]> * docs(manifestwork): fix celExpressions example to use string array per API spec Signed-off-by: zhujian <[email protected]> --------- Signed-off-by: zhujian <[email protected]>
1 parent 5f4daba commit 18703df

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

‎content/en/docs/concepts/work-distribution/manifestwork.md‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,14 @@ spec:
207207
name: pi-calculation
208208
namespace: default
209209
spec:
210+
manualSelector: true
211+
selector:
212+
matchLabels:
213+
job: pi-calculation
210214
template:
215+
metadata:
216+
labels:
217+
job: pi-calculation
211218
spec:
212219
containers:
213220
- name: pi
@@ -263,12 +270,12 @@ manifestConfigs:
263270
- condition: Complete
264271
type: CEL
265272
celExpressions:
266-
- expression: |
267-
object.status.conditions.filter(
268-
c, c.type == 'Complete' || c.type == 'Failed'
269-
).exists(
270-
c, c.status == 'True'
271-
)
273+
- |
274+
object.status.conditions.filter(
275+
c, c.type == 'Complete' || c.type == 'Failed'
276+
).exists(
277+
c, c.status == 'True'
278+
)
272279
messageExpression: |
273280
result ? "Custom resource is complete" : "Custom resource is not complete"
274281
```

0 commit comments

Comments
 (0)