Skip to content

Commit

Permalink
Ignore comparison of pv volumes. Do not use lister to get jop-aux dep…
Browse files Browse the repository at this point in the history
…loyment
  • Loading branch information
satr committed Jan 29, 2025
1 parent 7f4d71e commit d6c3503
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/apis/volumemount/persistentvolume.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ func EqualPersistentVolumes(pv1, pv2 *corev1.PersistentVolume) bool {
return false
}
// Ignore for now, due to during transition period this would affect existing volume mounts, managed by a provisioner. When all volume mounts gets labels, uncomment these lines
if !utils.EqualStringMaps(pv1.GetLabels(), pv2.GetLabels()) {
return false
}
//if !utils.EqualStringMaps(pv1.GetLabels(), pv2.GetLabels()) {
// return false
//}
expectedClonedVolumeAttrs := cloneMap(pv1.Spec.CSI.VolumeAttributes, csiVolumeMountAttributePvName, csiVolumeMountAttributePvcName, csiVolumeMountAttributeProvisionerIdentity)
actualClonedVolumeAttrs := cloneMap(pv2.Spec.CSI.VolumeAttributes, csiVolumeMountAttributePvName, csiVolumeMountAttributePvcName, csiVolumeMountAttributeProvisionerIdentity)
if !utils.EqualStringMaps(expectedClonedVolumeAttrs, actualClonedVolumeAttrs) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/volumemount/volumemount.go
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ func garbageCollectSecrets(ctx context.Context, kubeUtil *kube.Kube, namespace s
// GetExistingJobAuxComponentVolumes Get existing job aux component volumes
func GetExistingJobAuxComponentVolumes(ctx context.Context, kubeUtil *kube.Kube, namespace, jobComponentName string) ([]corev1.Volume, error) {
jobAuxKubeDeploymentName := defaults.GetJobAuxKubeDeployName(jobComponentName)
jobAuxKubeDeployment, err := kubeUtil.GetDeployment(ctx, namespace, jobAuxKubeDeploymentName)
jobAuxKubeDeployment, err := kubeUtil.KubeClient().AppsV1().Deployments(namespace).Get(ctx, jobAuxKubeDeploymentName, metav1.GetOptions{})
if err != nil {
if k8serrors.IsNotFound(err) {
return nil, nil
Expand Down

0 comments on commit d6c3503

Please sign in to comment.