apiVersion: admissionregistration.k8s.io/v1
import "k8s.io/api/admissionregistration/v1"
Variable {#Variable}
Variable 是指用于组合的变量定义;Variable 被定义为一种具名表达式。
<hr>
<table> <thead><tr><th>字段</th><th>描述</th></tr></thead> <tbody> <tr> <td><code>expression</code> <strong>*</strong><br/><em>string</em></td> <td>
expression 是将被求值并作为变量值的表达式。
该 CEL 表达式可以访问与“验证”(Validation)中的 CEL 表达式相同的标识符。
</td>
</tr>
<tr>
<td><code>name</code> <strong>*</strong><br/><em>string</em></td>
<td>
name 是变量的名称。该名称必须是合法的 CEL 标识符,且在所有变量中必须唯一。
该变量可在其他表达式中通过 `variables` 进行访问;
例如,如果名称为 "foo",则该变量可通过 `variables.foo` 访问。
</td>
</tr>
</tbody> </table>
来源:Kubernetes 文档贡献者 · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
