Skip to content

Commit 4f32cb7

Browse files
committed
Adding SELinux Documentation
1 parent 35920ae commit 4f32cb7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/openshift.md

+16
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,19 @@ DirectPV runs under project `directpv` in Red Hat OpenShift. Project `directpv`
77
## Limitations
88
* DirectPV does not support volume snapshot feature as per CSI specification. DirectPV is specifically meant for use cases like MinIO where the data availability and resiliency is taken care by the application itself. Additionally, with the AWS S3 versioning APIs and internal healing, snapshots is not a requirement.
99
* DirectPV does not support `ReadWriteMany` volume access mode. The workloads using DirectPV run local to the node and are provisioned from local storage drives in the node. This allows the workloads to directly access data without any additional network hops, unlike remote volumes, network PVs, etc. The additional network hops may lead to poor performance and increases the complexity. With `ReadWriteOnce` access mode, DirectPV provides high performance storage for Pods.
10+
11+
## SELinux in OpenShift:
12+
13+
If you encounter the `relabel failed` error after executing the `suspend` or `resume` commands, you should set `spc_t` at Pod's level or Container's level, for example:
14+
15+
```yaml
16+
kind: Pod
17+
spec:
18+
securityContext:
19+
seLinuxOptions:
20+
type: "spc_t" # This applies to all containers unless overridden
21+
```
22+
23+
Ensure that the appropriate Security Context Constraints (SCCs) are in place, as illustrated in the following link: https://access.redhat.com/solutions/7025337.
24+
25+
Additionally, this issue has been observed in OpenShift version 4.12 and later. Pods that use suspended drives or volumes may fail due to the kubelet attempting to perform SELinux relabeling. This happens because the `lsetxattr` system call fails on a read-only filesystem. The problem can affect any pod that consumes a suspended volume, not just MinIO Tenant pods.

0 commit comments

Comments
 (0)