Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions hack/github-actions-runner/restricted-v3-fuse-scc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
metadata:
name: restricted-v3-fuse
annotations:
kubernetes.io/description: >-
Based on restricted-v3 with minimal changes to enable unprivileged
FUSE mounts: allows uid 0 and CAP_SYS_ADMIN inside user
namespaces. userNamespaceLevel: RequirePodLevel ensures these
privileges only exist inside the user namespace and map to
unprivileged host identities.
# Identical to restricted-v3
allowHostDirVolumePlugin: false
allowHostIPC: false
allowHostNetwork: false
allowHostPID: false
allowHostPorts: false
allowPrivilegeEscalation: false
allowPrivilegedContainer: false
readOnlyRootFilesystem: false
priority: null
seLinuxContext:
type: MustRunAs
seccompProfiles:
- runtime/default
userNamespaceLevel: RequirePodLevel
volumes:
- configMap
- csi
- downwardAPI
- emptyDir
- ephemeral
- image
- persistentVolumeClaim
- projected
- secret
users: []
groups: []
# Changed from restricted-v3: allow SYS_ADMIN for FUSE mounts
allowedCapabilities:
- NET_BIND_SERVICE
- SYS_ADMIN
requiredDropCapabilities:
- ALL
# Changed from restricted-v3: allow uid 0 inside user namespace
runAsUser:
type: MustRunAsRange
uidRangeMin: 0
uidRangeMax: 65534
fsGroup:
type: MustRunAs
ranges:
- min: 0
max: 65534
supplementalGroups:
type: MustRunAs
ranges:
- min: 0
max: 65534
10 changes: 10 additions & 0 deletions hack/github-actions-runner/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@ minRunners: 1
maxRunners: 70

template:
metadata:
annotations:
io.kubernetes.cri-o.Devices: "/dev/fuse"
spec:
hostUsers: false
securityContext:
runAsUser: 0
containers:
- name: runner
image: quay.io/redhat-user-workloads/crt-redhat-acm-tenant/hypershift-gh-actions-runner:latest
command: ["/home/runner/run.sh"]
securityContext:
capabilities:
drop: ["ALL"]
add: ["SYS_ADMIN"]
Comment thread
coderabbitai[bot] marked this conversation as resolved.
volumeMounts:
- name: go-cache
mountPath: /cache/go-build
Expand Down
Loading