ObjectReference
import "k8s.io/api/core/v1"
ObjectReference 包含了足够的信息,使你可以检查或修改所引用的对象。
apiVersion (string)
被引用对象的 API 版本。
fieldPath (string)
如果引用的是对象的一部分而不是整个对象,此字符串应该包含一个有效的 JSON/Go 字段访问语句,例如 desiredState.manifest.containers[2]。例如,如果对象引用指向 Pod 中的一个容器,其值将如下所示:"spec.containers{name}"(其中 "name" 指代触发事件的容器名称),如果未指定容器名称,则为 "spec.containers[2]"(该 Pod 中索引为 2 的容器)。选择此语法只是为了有一种明确的方式来引用对象的一部分。
kind (string)
被引用对象的类别。更多信息请参阅:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
name (string)
被引用对象的名称。更多信息请参阅:https://kubernetes.ac.cn/docs/concepts/overview/working-with-objects/names/#names
namespace (string)
被引用对象的命名空间。更多信息请参阅:https://kubernetes.ac.cn/docs/concepts/overview/working-with-objects/namespaces/
resourceVersion (string)
如果有,指明此引用对应的特定 resourceVersion。更多信息请参阅:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
uid (string)
被引用对象的 UID。更多信息请参阅:https://kubernetes.ac.cn/docs/concepts/overview/working-with-objects/names/#uids
此页面是自动生成的。
如果你计划报告此页面的问题,请在问题描述中提及此页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。