Skip to content

Commit dbd173d

Browse files
Adjust messageExpression examples from {} to printf style.
1 parent 3448066 commit dbd173d

File tree

1 file changed

+2
-2
lines changed
  • keps/sig-api-machinery/3488-cel-admission-control

1 file changed

+2
-2
lines changed

keps/sig-api-machinery/3488-cel-admission-control/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ spec:
407407
validations:
408408
- name: max-replicas
409409
expression: "object.spec.replicas <= params.maxReplicas"
410-
messageExpression: "'object.spec.replicas must be no greater than {}'.format([params.maxReplicas])"
410+
messageExpression: "'object.spec.replicas must be no greater than %d'.format([params.maxReplicas])"
411411
reason: Invalid
412412
# ...other rule related fields here...
413413
```
@@ -2894,7 +2894,7 @@ spec.x[xKey].y[yIndex].field
28942894
validations:
28952895
- scope: "x[xKey].y[yIndex].field"
28962896
expression: "scope.startsWith('xyz-')"
2897-
messageExpression: "'{}, {}: some problem'.format([scopePath.xKey, scopePath.yIndex])"
2897+
messageExpression: "'%s, %d: some problem'.format([scopePath.xKey, scopePath.yIndex])"
28982898
```
28992899

29002900
Prior art:

0 commit comments

Comments
 (0)