issue 8433: add ask label to data mover pods

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
This commit is contained in:
Lyndon-Li
2024-12-10 13:42:10 +08:00
parent a72aff2a3b
commit cce4d4815a
4 changed files with 17 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
Fix issue #8433, add aks label to data mover pods
+4
View File
@@ -488,6 +488,10 @@ func (e *csiSnapshotExposer) createBackupPod(
}
label[podGroupLabel] = podGroupSnapshot
for k, v := range thirdPartyLabels {
label[k] = v
}
volumeMode := corev1.PersistentVolumeFilesystem
if backupPVC.Spec.VolumeMode != nil {
volumeMode = *backupPVC.Spec.VolumeMode
+8
View File
@@ -323,6 +323,14 @@ func (e *genericRestoreExposer) createRestorePod(ctx context.Context, ownerObjec
}}
volumes = append(volumes, podInfo.volumes...)
if label == nil {
label = make(map[string]string)
}
for k, v := range thirdPartyLabels {
label[k] = v
}
volumeMode := corev1.PersistentVolumeFilesystem
if targetPVC.Spec.VolumeMode != nil {
volumeMode = *targetPVC.Spec.VolumeMode
+4
View File
@@ -39,3 +39,7 @@ type ExposeByPod struct {
HostingContainer string
VolumeName string
}
var thirdPartyLabels map[string]string = map[string]string{
"azure.workload.identity/use": "true",
}