You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/zh-cn/docs/reference/using-api/cel.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,7 +89,7 @@ CEL 表达式示例:
89
89
| `has(self.expired) && self.created + self.ttl < self.expired` | Validate that 'expired' date is after a 'create' date plus a 'ttl' duration |
90
90
| `self.health.startsWith('ok')` | Validate a 'health' string field has the prefix 'ok' |
91
91
| `self.widgets.exists(w, w.key == 'x' && w.foo < 10)` | Validate that the 'foo' property of a listMap item with a key 'x' is less than 10 |
92
-
| `type(self) == string ? self == '99%' : self == 42` | Validate an int-or-string field for both the the int and string cases |
92
+
| `type(self) == string ? self == '99%' : self == 42` | Validate an int-or-string field for both the int and string cases |
93
93
| `self.metadata.name == 'singleton'` | Validate that an object's name matches a specific value (making it a singleton) |
94
94
| `self.set1.all(e, !(e in self.set2))` | Validate that two listSets are disjoint |
95
95
| `self.names.size() == self.details.size() && self.names.all(n, n in self.details)` | Validate the 'details' map is keyed by the items in the 'names' listSet |
@@ -322,7 +322,7 @@ that `object` refers to, because `object` is dynamically typed.
322
322
323
323
<!--
324
324
The `has()` macro in CEL may be used in CEL expressions to check if a field of a
325
-
dynamically typed variable is accessable before attempting to access the field's
325
+
dynamically typed variable is accessible before attempting to access the field's
326
326
value. For example:
327
327
-->
328
328
在 CEL 中,`has()` 宏可用于检查动态类型变量的字段是否可访问,然后再尝试访问该字段的值。
@@ -503,7 +503,7 @@ CEL 的资源约束特性用于防止 CEL 评估消耗过多的 API 服务器资
503
503
504
504
<!--
505
505
A key element of the resource constraint features is a _cost unit_ that CEL
506
-
defines as a way of tracking CPU utilization. Cost units are independant of
506
+
defines as a way of tracking CPU utilization. Cost units are independent of
507
507
system load and hardware. Cost units are also deterministic; for any given CEL
508
508
expression and input data, evaluation of the expression by the CEL interpreter
0 commit comments