// SortArrayAndComputeHash sorts a string array and // returns a hash for it func SortArrayAndComputeHash(s []string) (string, error) { … } // Copied from https://github.com/kubernetes/kubernetes // /blob/master/pkg/kubectl/util/hash/hash.go func encode(hex string) (string, error) { … } // hex256 returns the hex form of the sha256 of the argument. func hex256(data string) string { … } type Hasher … // Hash returns a hash of the argument. func (h *Hasher) Hash(node *yaml.RNode) (r string, err error) { … } func getNodeValues( node *yaml.RNode, paths []string) (map[string]interface{ … } // encodeConfigMap encodes a ConfigMap. // Data, Kind, and Name are taken into account. // BinaryData is included if it's not empty to avoid useless key in output. func encodeConfigMap(node *yaml.RNode) (string, error) { … } // encodeSecret encodes a Secret. // Data, Kind, Name, and Type are taken into account. // StringData is included if it's not empty to avoid useless key in output. func encodeSecret(node *yaml.RNode) (string, error) { … }