mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-08 14:21:18 +00:00
Add file system group setting for deployment and pod used in E2E test.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
This commit is contained in:
@@ -93,6 +93,10 @@ func NewDeployment(name, ns string, replicas int32, labels map[string]string, co
|
||||
Labels: labels,
|
||||
},
|
||||
Spec: v1.PodSpec{
|
||||
SecurityContext: &v1.PodSecurityContext{
|
||||
FSGroup: func(i int64) *int64 { return &i }(65534),
|
||||
FSGroupChangePolicy: func(policy v1.PodFSGroupChangePolicy) *v1.PodFSGroupChangePolicy { return &policy }(v1.FSGroupChangeAlways),
|
||||
},
|
||||
Containers: containers,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -70,6 +70,10 @@ func CreatePod(client TestClient, ns, name, sc, pvcName string, volumeNameList [
|
||||
Annotations: ann,
|
||||
},
|
||||
Spec: corev1.PodSpec{
|
||||
SecurityContext: &v1.PodSecurityContext{
|
||||
FSGroup: func(i int64) *int64 { return &i }(65534),
|
||||
FSGroupChangePolicy: func(policy v1.PodFSGroupChangePolicy) *v1.PodFSGroupChangePolicy { return &policy }(v1.FSGroupChangeAlways),
|
||||
},
|
||||
Containers: []corev1.Container{
|
||||
{
|
||||
Name: name,
|
||||
|
||||
Reference in New Issue
Block a user