mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #93589 from jingxu97/July/csiwindowstest
Update e2e storage tests for Windows cluster
This commit is contained in:
commit
d3a49f7c63
@ -19,6 +19,7 @@ package pod
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
@ -179,7 +180,7 @@ func MakeSecPod(podConfig *Config) (*v1.Pod, error) {
|
|||||||
podConfig.Command = "trap exit TERM; while true; do sleep 1; done"
|
podConfig.Command = "trap exit TERM; while true; do sleep 1; done"
|
||||||
}
|
}
|
||||||
podName := "pod-" + string(uuid.NewUUID())
|
podName := "pod-" + string(uuid.NewUUID())
|
||||||
if podConfig.FsGroup == nil {
|
if podConfig.FsGroup == nil && runtime.GOOS != "windows" {
|
||||||
podConfig.FsGroup = func(i int64) *int64 {
|
podConfig.FsGroup = func(i int64) *int64 {
|
||||||
return &i
|
return &i
|
||||||
}(1000)
|
}(1000)
|
||||||
@ -239,7 +240,9 @@ func MakeSecPod(podConfig *Config) (*v1.Pod, error) {
|
|||||||
podSpec.Spec.Containers[0].VolumeMounts = volumeMounts
|
podSpec.Spec.Containers[0].VolumeMounts = volumeMounts
|
||||||
podSpec.Spec.Containers[0].VolumeDevices = volumeDevices
|
podSpec.Spec.Containers[0].VolumeDevices = volumeDevices
|
||||||
podSpec.Spec.Volumes = volumes
|
podSpec.Spec.Volumes = volumes
|
||||||
|
if runtime.GOOS != "windows" {
|
||||||
podSpec.Spec.SecurityContext.SELinuxOptions = podConfig.SeLinuxLabel
|
podSpec.Spec.SecurityContext.SELinuxOptions = podConfig.SeLinuxLabel
|
||||||
|
}
|
||||||
|
|
||||||
SetNodeSelection(&podSpec.Spec, podConfig.NodeSelection)
|
SetNodeSelection(&podSpec.Spec, podConfig.NodeSelection)
|
||||||
return podSpec, nil
|
return podSpec, nil
|
||||||
|
@ -248,12 +248,13 @@ var (
|
|||||||
FsType: "ntfs",
|
FsType: "ntfs",
|
||||||
FeatureTag: "[sig-windows]",
|
FeatureTag: "[sig-windows]",
|
||||||
}
|
}
|
||||||
// NtfsDynamicPV is TestPattern for "Dynamic PV (xfs)"
|
// NtfsDynamicPV is TestPattern for "Dynamic PV (ntfs)"
|
||||||
NtfsDynamicPV = TestPattern{
|
NtfsDynamicPV = TestPattern{
|
||||||
Name: "Dynamic PV (ntfs)",
|
Name: "Dynamic PV (ntfs)",
|
||||||
VolType: DynamicPV,
|
VolType: DynamicPV,
|
||||||
FsType: "ntfs",
|
FsType: "ntfs",
|
||||||
FeatureTag: "[sig-windows]",
|
FeatureTag: "[sig-windows]",
|
||||||
|
SnapshotDeletionPolicy: DeleteSnapshot,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Definitions for Filesystem volume mode
|
// Definitions for Filesystem volume mode
|
||||||
|
Loading…
Reference in New Issue
Block a user