Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TemplateHashLabelName is a label to annotate a Kubernetes resource // with the hash of its initial template before creation. TemplateHashLabelName = "cstor.openebs.io/template-hash" )
Variables ¶
This section is empty.
Functions ¶
func GetTemplateHashLabel ¶
GetTemplateHashLabel returns the template hash label value if set, or an empty string.
func HashObject ¶
func HashObject(object interface{}) string
HashObject writes the specified object to a hash using the spew library which follows pointers and prints actual values of the nested objects ensuring the hash does not change when a pointer changes. The returned hash can be used for object comparisons.
This is inspired by controller revisions in StatefulSets: https://github.com/kubernetes/kubernetes/blob/8de1569ddae62e8fab559fe6bd210a5d6100a277/pkg/controller/history/controller_history.go#L89-L101
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.