Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for DeepHashObject (0.16 sec)

  1. cmd/kubeadm/app/util/staticpod/utils.go

    	})
    	return usersAndGroups, err
    }
    
    // DeepHashObject writes specified object to 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.
    // Copied from k8s.io/kubernetes/pkg/util/hash/hash.go#DeepHashObject
    func DeepHashObject(hasher hash.Hash, objectToWrite interface{}) {
    	hasher.Reset()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jan 14 13:07:56 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  2. pkg/kubelet/config/common.go

    }
    
    func applyDefaults(pod *api.Pod, source string, isFile bool, nodeName types.NodeName) error {
    	if len(pod.UID) == 0 {
    		hasher := md5.New()
    		hash.DeepHashObject(hasher, pod)
    		// DeepHashObject resets the hash, so we should write the pod source
    		// information AFTER it.
    		if isFile {
    			fmt.Fprintf(hasher, "host:%s", nodeName)
    			fmt.Fprintf(hasher, "file:%s", source)
    		} else {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 03 18:40:48 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  3. pkg/kubelet/container/helpers.go

    // Note: remember to update hashValues in container_hash_test.go as well.
    func HashContainer(container *v1.Container) uint64 {
    	hash := fnv.New32a()
    	containerJSON, _ := json.Marshal(pickFieldsToHash(container))
    	hashutil.DeepHashObject(hash, containerJSON)
    	return uint64(hash.Sum32())
    }
    
    // pickFieldsToHash pick fields that will affect the running status of the container for hash,
    // currently this field range only contains `image` and `name`.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  4. pkg/controller/controller_utils.go

    // avoid bad words.
    func ComputeHash(template *v1.PodTemplateSpec, collisionCount *int32) string {
    	podTemplateSpecHasher := fnv.New32a()
    	hashutil.DeepHashObject(podTemplateSpecHasher, *template)
    
    	// Add collisionCount in the hash if it exists.
    	if collisionCount != nil {
    		collisionCountBytes := make([]byte, 8)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 12 15:34:44 UTC 2024
    - 47.6K bytes
    - Viewed (0)
Back to top