(currentMounts, targetMounts []corev1.VolumeMount)
| 194 | } |
| 195 | |
| 196 | func compareVolumeMounts(currentMounts, targetMounts []corev1.VolumeMount) (bool, string) { |
| 197 | current := make(map[string]corev1.VolumeMount) |
| 198 | target := make(map[string]corev1.VolumeMount) |
| 199 | for _, mount := range currentMounts { |
| 200 | normalized := normalizeVolumeMountName(mount) |
| 201 | mount.Name = normalized |
| 202 | current[normalized] = mount |
| 203 | } |
| 204 | for _, mount := range targetMounts { |
| 205 | target[mount.Name] = mount |
| 206 | } |
| 207 | |
| 208 | return compareMaps(current, target) |
| 209 | } |
| 210 | |
| 211 | // doContainersMatch checks if the containers match. They are assumed to be for the same name. |
| 212 | // If they don't match, the first diff found is returned |
no test coverage detected