Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TemplateHashKey is a key for storing PodTemplateSpec's hash value in labels. // It will be used to check whether pod's PodTemplateSpec has changed, if yes, // we need recreate or do in-place update for the pod according to the value of UniqHash. TemplateHashKey = "tapp_template_hash_key" // UniqHashKey is a key for storing hash value of PodTemplateSpec(without container images) in labels. // It will will be used to check whether pod's PodTemplateSpec hash changed and only container images // changed, if yes, we will do in place update for the pod. UniqHashKey = "tapp_uniq_hash_key" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TappHashInterface ¶
type TappHashInterface interface { // SetTemplateHash sets PodTemplateSpec's hash value into template's labels, // returns true if needs set and is set, otherwise false SetTemplateHash(template *corev1.PodTemplateSpec) bool // GetTemplateHash returns PodTemplateSpec's hash value, the values is stored in labels. GetTemplateHash(labels map[string]string) string // SetUniqHash sets hash value of PodTemplateSpec(without container images) into template's labels, // returns true if needs set and is set, otherwise false SetUniqHash(template *corev1.PodTemplateSpec) bool // GetUniqHash returns hash value of PodTemplateSpec(without container images), the values is stored in labels. GetUniqHash(labels map[string]string) string // HashLabels returns labels key that stores TemplateHash and UniqHash HashLabels() []string }
TappHashInterface is used for generate and verify hash for tapp.
func NewTappHash ¶
func NewTappHash() TappHashInterface
Click to show internal directories.
Click to hide internal directories.