Skip to content
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.

Implement OwnerReferences to simplify garbage collection #15

Open
gianarb opened this issue Jan 5, 2018 · 0 comments
Open

Implement OwnerReferences to simplify garbage collection #15

gianarb opened this issue Jan 5, 2018 · 0 comments

Comments

@gianarb
Copy link
Contributor

gianarb commented Jan 5, 2018

As @stefanprodan suggested on twitter we should implement Owner reference metadata to automatically manage garbage collection.

// ObjectMeta is metadata that all persisted resources must have, which includes all objects
// users must create.
type ObjectMeta struct {
	// Name must be unique within a namespace. Is required when creating resources, although
	// some resources may allow a client to request the generation of an appropriate name
	// automatically. Name is primarily intended for creation idempotence and configuration
	// definition.
	// Cannot be updated.
	// More info: http://kubernetes.io/docs/user-guide/identifiers#names
	// +optional
	Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`




	// List of objects depended by this object. If ALL objects in the list have
	// 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.
	// +optional
	// +patchMergeKey=uid
	// +patchStrategy=merge
	OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant