check if the pod has a valid podSpec
(pod *corev1.Pod)
| 471 | |
| 472 | // check if the pod has a valid podSpec |
| 473 | func hasValidPodSpec(pod *corev1.Pod) bool { |
| 474 | podSpecAnnotation, hasStoredPodSpec := pod.Annotations[utils.PodSpecAnnotationName] |
| 475 | if !hasStoredPodSpec { |
| 476 | return false |
| 477 | } |
| 478 | err := json.Unmarshal([]byte(podSpecAnnotation), &corev1.PodSpec{}) |
| 479 | return err == nil |
| 480 | } |
| 481 | |
| 482 | func checkPodNeedsUpdatedTopology(_ context.Context, pod *corev1.Pod, cluster *apiv1.Cluster) (rollout, error) { |
| 483 | if reflect.DeepEqual(cluster.Spec.TopologySpreadConstraints, pod.Spec.TopologySpreadConstraints) { |
no outgoing calls
no test coverage detected