Skip to content

Commit

Permalink
Revert "[bitnami/seaweedfs] Fix tests (#26400)" (#26534)
Browse files Browse the repository at this point in the history
This reverts commit 671e9b6.

Signed-off-by: Rafael Rios Saavedra <[email protected]>
  • Loading branch information
rafariossaa authored May 29, 2024
1 parent 75985a9 commit 7ca9126
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .vib/seaweedfs/ginkgo/seaweedfs_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,23 @@ func createPVC(ctx context.Context, c kubernetes.Interface, name, size string) e
}

func createJob(ctx context.Context, c kubernetes.Interface, name, port, image, pvcName, kind string) error {
podSecurityContext := &v1.PodSecurityContext{
FSGroup: &[]int64{1001}[0],
FSGroupChangePolicy: &[]v1.PodFSGroupChangePolicy{v1.FSGroupChangeAlways}[0],
}
containerSecurityContext := &v1.SecurityContext{
Privileged: &[]bool{false}[0],
AllowPrivilegeEscalation: &[]bool{false}[0],
RunAsUser: &[]int64{1001}[0],
RunAsNonRoot: &[]bool{true}[0],
Capabilities: &v1.Capabilities{
Drop: []v1.Capability{"ALL"},
},
SeccompProfile: &v1.SeccompProfile{
Type: "RuntimeDefault",
},
}

args := []string{"-ec"}
switch kind {
case kindDownload:
Expand All @@ -95,7 +112,7 @@ cat /data/fid | xargs weed download -server ${MASTER_HOST}:${MASTER_PORT}
Template: v1.PodTemplateSpec{
Spec: v1.PodSpec{
RestartPolicy: "Never",
SecurityContext: &v1.PodSecurityContext{},
SecurityContext: podSecurityContext,
Containers: []v1.Container{
{
Name: "seaweedfs",
Expand All @@ -112,7 +129,7 @@ cat /data/fid | xargs weed download -server ${MASTER_HOST}:${MASTER_PORT}
Value: port,
},
},
SecurityContext: &v1.SecurityContext{},
SecurityContext: containerSecurityContext,
VolumeMounts: []v1.VolumeMount{
{
Name: "data",
Expand Down

0 comments on commit 7ca9126

Please sign in to comment.