|
82 | 82 | import org.apache.commons.lang3.builder.EqualsBuilder;
|
83 | 83 | import org.apache.commons.lang3.builder.HashCodeBuilder;
|
84 | 84 |
|
| 85 | +import static oracle.kubernetes.common.AuxiliaryImageConstants.AUXILIARY_IMAGE_VOLUME_NAME_OLD_PREFIX; |
| 86 | +import static oracle.kubernetes.common.AuxiliaryImageConstants.AUXILIARY_IMAGE_VOLUME_NAME_PREFIX; |
85 | 87 | import static oracle.kubernetes.common.CommonConstants.COMPATIBILITY_MODE;
|
86 | 88 | import static oracle.kubernetes.common.helpers.AuxiliaryImageEnvVars.AUXILIARY_IMAGE_MOUNT_PATH;
|
87 | 89 | import static oracle.kubernetes.common.logging.MessageKeys.CYCLING_POD_EVICTED;
|
@@ -1177,7 +1179,8 @@ private boolean canAdjustLegacyHashToMatch(V1Pod currentPod, String requiredHash
|
1177 | 1179 | }
|
1178 | 1180 |
|
1179 | 1181 | private void adjustVolumeMountName(List<V1VolumeMount> convertedVolumeMounts, V1VolumeMount volumeMount) {
|
1180 |
| - convertedVolumeMounts.add(volumeMount.name(volumeMount.getName().replaceAll("^" + COMPATIBILITY_MODE, ""))); |
| 1182 | + convertedVolumeMounts.add(volumeMount.name(volumeMount.getName().replaceAll("^" + COMPATIBILITY_MODE |
| 1183 | + + AUXILIARY_IMAGE_VOLUME_NAME_PREFIX, AUXILIARY_IMAGE_VOLUME_NAME_OLD_PREFIX))); |
1181 | 1184 | }
|
1182 | 1185 |
|
1183 | 1186 | private void adjustContainer(List<V1Container> convertedContainers, V1Container container, V1Pod currentPod) {
|
@@ -1212,7 +1215,8 @@ private boolean isPodFromOperatorMajorMinorVersion34RevAbove0(V1Pod currentPod)
|
1212 | 1215 | }
|
1213 | 1216 |
|
1214 | 1217 | private void adjustVolumeName(List<V1Volume> convertedVolumes, V1Volume volume) {
|
1215 |
| - convertedVolumes.add(volume.name(volume.getName().replaceAll("^" + COMPATIBILITY_MODE, ""))); |
| 1218 | + convertedVolumes.add(volume.name(volume.getName().replaceAll("^" + COMPATIBILITY_MODE |
| 1219 | + + AUXILIARY_IMAGE_VOLUME_NAME_PREFIX, AUXILIARY_IMAGE_VOLUME_NAME_OLD_PREFIX))); |
1216 | 1220 | }
|
1217 | 1221 |
|
1218 | 1222 | private void convertAuxImagesInitContainerVolumeAndMounts(V1Pod recipe, V1Pod currentPod) {
|
|
0 commit comments