Skip to content

Commit 87084ce

Browse files
committed
issue 8847: inherit pod info from node-agent-windows
Signed-off-by: Lyndon-Li <[email protected]>
1 parent 3df026f commit 87084ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/exposer/generic_restore.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,14 +377,14 @@ func (e *genericRestoreExposer) RebindVolume(ctx context.Context, ownerObject co
377377
}
378378

379379
func (e *genericRestoreExposer) createRestorePod(ctx context.Context, ownerObject corev1.ObjectReference, targetPVC *corev1.PersistentVolumeClaim,
380-
operationTimeout time.Duration, label map[string]string, annotation map[string]string, selectedNode string, resources corev1.ResourceRequirements, nodeType string) (*corev1.Pod, error) {
380+
operationTimeout time.Duration, label map[string]string, annotation map[string]string, selectedNode string, resources corev1.ResourceRequirements, nodeOS string) (*corev1.Pod, error) {
381381
restorePodName := ownerObject.Name
382382
restorePVCName := ownerObject.Name
383383

384384
containerName := string(ownerObject.UID)
385385
volumeName := string(ownerObject.UID)
386386

387-
podInfo, err := getInheritedPodInfo(ctx, e.kubeClient, ownerObject.Namespace, kube.NodeOSLinux)
387+
podInfo, err := getInheritedPodInfo(ctx, e.kubeClient, ownerObject.Namespace, nodeOS)
388388
if err != nil {
389389
return nil, errors.Wrap(err, "error to get inherited pod info from node-agent")
390390
}
@@ -427,7 +427,7 @@ func (e *genericRestoreExposer) createRestorePod(ctx context.Context, ownerObjec
427427
nodeSelector := map[string]string{}
428428
podOS := corev1.PodOS{}
429429
toleration := []corev1.Toleration{}
430-
if nodeType == kube.NodeOSWindows {
430+
if nodeOS == kube.NodeOSWindows {
431431
userID := "ContainerAdministrator"
432432
securityCtx = &corev1.PodSecurityContext{
433433
WindowsOptions: &corev1.WindowsSecurityContextOptions{

0 commit comments

Comments
 (0)