code: func GetResourceRequest(pod *v1.Pod, resource v1.ResourceName) int64 {
  	if resource == v1.ResourcePods {
  		return 1
  	}
  	totalResources := int64(0)
  	for _, container := range pod.Spec.Containers {
  		if rQuantity, ok := container.Resources.Requests[resource]; ok {
  			if resource == v1.ResourceCPU {
  				totalResources += rQuantity.MilliValue()
  			} else {
  				totalResources += rQuantity.Value()
  			}
  		}
  	}
  	// take max_resource(sum_pod, any_init_container)
  	for _, container := range pod.Spec.InitContainers {
  		if rQuantity, ok := container.Resources.Requests[resource]; ok {
  			if resource == v1.ResourceCPU && rQuantity.MilliValue() > totalResources {
  				totalResources = rQuantity.MilliValue()
  			} else if rQuantity.Value() > totalResources {
  				totalResources = rQuantity.Value()
  			}
  		}
  	}
  	return totalResources
  }
docs: // GetResourceRequest finds and returns the request for a specific resource.