func calculateMaxPodsToUpdate(cloud *solr.SolrCloud, totalPods int, outOfDatePodCount int, outOfDatePodsNotStartedCount int, availableUpdatedPodCount int) (maxPodsUnavailable int, unavailableUpdatedPodCount int, maxPodsToUpdate int) {
	// In order to calculate the number of updated pods that are unavailable take all pods, take the total pods and subtract those that are available and updated, and those that are not updated.
	unavailableUpdatedPodCount = totalPods - availableUpdatedPodCount - outOfDatePodCount - outOfDatePodsNotStartedCount
	// If the maxBatchNodeUpgradeSpec is passed as a decimal between 0 and 1, then calculate as a percentage of the number of nodes.
	maxPodsUnavailable, _ = ResolveMaxPodsUnavailable(cloud.Spec.UpdateStrategy.ManagedUpdateOptions.MaxPodsUnavailable, totalPods)
	// Subtract:
	//   - unavailableUpdatedPodCount, because those pods are already unavailable
	//   - outOfDatePodsNotStartedCount, because those pods will always be deleted first and affect the number of unavailable pods
	maxPodsToUpdate = maxPodsUnavailable - unavailableUpdatedPodCount - outOfDatePodsNotStartedCount
	return maxPodsUnavailable, unavailableUpdatedPodCount, maxPodsToUpdate
}
// calculateMaxPodsToUpdate determines the maximum number of additional pods that can be updated.
calculateMaxPodsToUpdate determines the maximum number of additional pods that can be updated.
// calculateMaxPodsToUpdate determines the maximum number of additional pods that can be updated .
func calculateMaxPodsToUpdate(cloud *solr.SolrCloud, totalPods int, outOfDatePodCount int, outOfDatePodsNotStartedCount int, availableUpdatedPodCount int) (maxPodsUnavailable int, unavailableUpdatedPodCount int, maxPodsToUpdate int) {
	unavailableUpdatedPodCount = totalPods - availableUpdatedPodCount - outOfDatePodCount - outOfDatePodsNotStartedCount
	maxPodsUnavailable, _ = ResolveMaxPodsUnavailable(cloud.Spec.UpdateStrategy.ManagedUpdateOptions.MaxPodsUnavailable, totalPods)
	maxPodsToUpdate = maxPodsUnavailable - unavailableUpdatedPodCount - outOfDatePodsNotStartedCount
	return maxPodsUnavailable, unavailableUpdatedPodCount, maxPodsToUpdate
}
func calculateMaxPodsToUpdate ( cloud * solr . SolrCloud , totalPods int , outOfDatePodCount int , outOfDatePodsNotStartedCount int , availableUpdatedPodCount int ) ( maxPodsUnavailable int , unavailableUpdatedPodCount int , maxPodsToUpdate int ) { unavailableUpdatedPodCount = totalPods - availableUpdatedPodCount - outOfDatePodCount - outOfDatePodsNotStartedCount maxPodsUnavailable , _ = ResolveMaxPodsUnavailable ( cloud . Spec . UpdateStrategy . ManagedUpdateOptions . MaxPodsUnavailable , totalPods ) maxPodsToUpdate = maxPodsUnavailable - unavailableUpdatedPodCount - outOfDatePodsNotStartedCount return maxPodsUnavailable , unavailableUpdatedPodCount , maxPodsToUpdate }
calculateMaxPodsToUpdate determines the maximum number of additional pods that can be updated.
calculateMaxPodsToUpdate determines the maximum number of additional pods that can be updated .
// In order to calculate the number of updated pods that are unavailable take all pods, take the total pods and subtract those that are available and updated, and those that are not updated. // If the maxBatchNodeUpgradeSpec is passed as a decimal between 0 and 1, then calculate as a percentage of the number of nodes. // Subtract: //   - unavailableUpdatedPodCount, because those pods are already unavailable //   - outOfDatePodsNotStartedCount, because those pods will always be deleted first and affect the number of unavailable pods