Commit 93df250
fix: add SELinux relabel init container for persistent volumes (#41)
Kubernetes may assign MCS categories to volumes that differ from the
pod's SELinux level, making data inaccessible (EACCES on mkdir/read).
This is unavoidable with shared PVCs where the kubelet relabels
volumes with random categories on each pod creation.
Adds a privileged init container that runs chcon -R on the data mount
before the app starts, ensuring labels always match the pod's context.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent dc26f4f commit 93df250
1 file changed
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
66 | 91 | | |
67 | 92 | | |
68 | 93 | | |
| |||
0 commit comments