Skip to content

Commit

Permalink
Merge pull request #18 from andrewh1978/onrootmismatch
Browse files Browse the repository at this point in the history
move back to px-bench namespace; fix permissions on both vanilla and ocp
  • Loading branch information
andrewh1978 authored Dec 7, 2023
2 parents f2733e0 + ab53424 commit f8c1f0f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
8 changes: 6 additions & 2 deletions px-bench-env.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
apiVersion: v1
kind: Namespace
metadata:
name: px-bench
---
apiVersion: v1
kind: ConfigMap
metadata:
name: env

namespace: px-bench
######
# Options that control the underlying fio benchmark utility. These equate to the same-named option in fio
#
Expand Down Expand Up @@ -45,4 +49,4 @@ data:
readwrite_list: "read write readwrite" # valid values are read, write, randread, readwrite (or rw), randrw.
storageclass_list: "storageclass-1 storageclass-2" # Existing storageclasses for use by the benchmarks
warmup_blocksize: 256k
warmup_loops: "1"
warmup_loops: "1"
14 changes: 11 additions & 3 deletions px-bench-main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: files
namespace: px-bench
data:
run.sh: |-
#!/usr/bin/bash
Expand Down Expand Up @@ -50,6 +50,7 @@ data:
apiVersion: v1
metadata:
name: mnt-$sc
namespace: px-bench
spec:
storageClassName: $sc
accessModes:
Expand All @@ -65,13 +66,16 @@ data:
kind: Job
metadata:
name: fio
namespace: px-bench
spec:
template:
metadata:
name: fio
labels:
px-bench: fio
spec:
securityContext:
fsGroupChangePolicy: "OnRootMismatch"
serviceAccountName: px-bench
terminationGracePeriodSeconds: 0
containers:
Expand All @@ -80,7 +84,6 @@ data:
imagePullPolicy: "Always"
command: [ "/bin/bash", "/px-bench/fio.sh" ]
securityContext:
runAsNonRoot: true
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
Expand Down Expand Up @@ -163,11 +166,13 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: px-bench
namespace: px-bench
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: px-bench
namespace: px-bench
rules:
- apiGroups: [""]
resources:
Expand All @@ -188,6 +193,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: px-bench
namespace: px-bench
subjects:
- kind: ServiceAccount
name: px-bench
Expand All @@ -200,13 +206,16 @@ apiVersion: batch/v1
kind: Job
metadata:
name: run
namespace: px-bench
spec:
template:
metadata:
name: run
labels:
px-bench: run
spec:
securityContext:
fsGroupChangePolicy: "OnRootMismatch"
serviceAccountName: px-bench
terminationGracePeriodSeconds: 0
containers:
Expand All @@ -215,7 +224,6 @@ spec:
imagePullPolicy: "Always"
command: [ "/bin/bash", "/px-bench/run.sh" ]
securityContext:
runAsNonRoot: true
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
Expand Down

0 comments on commit f8c1f0f

Please sign in to comment.