Skip to content

Commit

Permalink
Adjust messageExpression examples from {} to printf style.
Browse files Browse the repository at this point in the history
  • Loading branch information
DangerOnTheRanger committed Feb 2, 2023
1 parent 3448066 commit dbd173d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keps/sig-api-machinery/3488-cel-admission-control/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ spec:
validations:
- name: max-replicas
expression: "object.spec.replicas <= params.maxReplicas"
messageExpression: "'object.spec.replicas must be no greater than {}'.format([params.maxReplicas])"
messageExpression: "'object.spec.replicas must be no greater than %d'.format([params.maxReplicas])"
reason: Invalid
# ...other rule related fields here...
```
Expand Down Expand Up @@ -2894,7 +2894,7 @@ spec.x[xKey].y[yIndex].field
validations:
- scope: "x[xKey].y[yIndex].field"
expression: "scope.startsWith('xyz-')"
messageExpression: "'{}, {}: some problem'.format([scopePath.xKey, scopePath.yIndex])"
messageExpression: "'%s, %d: some problem'.format([scopePath.xKey, scopePath.yIndex])"
```

Prior art:
Expand Down

0 comments on commit dbd173d

Please sign in to comment.