OwnerReference
OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.
Schema URL
https://raw.githubusercontent.com/nlamirault/schema-hub/main/schemas/meta.api.k8s.io/OwnerReference_v1.json▶ Usage examples
VS Code / yaml-language-server
# yaml-language-server: $schema=https://raw.githubusercontent.com/nlamirault/schema-hub/main/schemas/meta.api.k8s.io/OwnerReference_v1.jsonkubeconform
kubeconform -schema-location 'https://raw.githubusercontent.com/nlamirault/schema-hub/main/schemas/{{ .Group }}/{{ .ResourceKind }}_{{ .ResourceAPIVersion }}.json' manifest.yamlResource Structure
apiVersionstringRequiredAPI version of the referent.
blockOwnerDeletionbooleanIf true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.
controllerbooleanIf true, this reference points to the managing controller.
kindstringRequiredKind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
namestringRequiredName of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
uidstringRequiredUID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids