Add Controller field to OwnerReference

This commit is contained in:
gmarek
2016-05-11 13:42:17 +02:00
parent 7b4e255219
commit a6dd89d797
22 changed files with 465 additions and 97 deletions

View File

@@ -140,7 +140,9 @@ type ObjectMeta struct {
Annotations map[string]string `json:"annotations,omitempty"`
// List of objects depended by this object. If ALL objects in the list have
// been deleted, this object will be garbage collected.
// been deleted, this object will be garbage collected. If this object is managed by a controller,
// then an entry in this list will point to this controller, with the controller field set to true.
// There cannot be more than one managing controller.
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
// Must be empty before the object is deleted from the registry. Each entry
@@ -2328,6 +2330,8 @@ type OwnerReference struct {
// UID of the referent.
// More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids
UID types.UID `json:"uid"`
// If true, this reference points to the managing controller.
Controller *bool `json:"controller,omitempty"`
}
// ObjectReference contains enough information to let you inspect or modify the referred object.