Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document initContainers workaround for CephFS RWX perm issue #374

Merged
merged 5 commits into from Mar 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 19 additions & 0 deletions pages/k8s/storage.md
Expand Up @@ -72,6 +72,25 @@ juju add-relation ceph-fs ceph-mon
**Charmed Kubernetes** will then deploy the CephFS provisioner pod
and create a `cephfs` storage class in the cluster.

<div class="p-notification--positive"><p markdown="1" class="p-notification__response">
<span class="p-notification__status">Note:</span>
Due to an upstream issue, containers running as a non-root user with a ReadWriteMany (RWX) CephFS volume
will not be able to write to the mounted directory. This will be fixed with the next release after the
next OpenStack charms release. In the meantime, you can work around this by adding a simple initContainer
to your pod to adjust the mounted volume permissions, such as:
<code>
initContainers:
- name: fix-cephfs-rwx-volume-perm
securityContext:
runAsUser: 0
image: ubuntu # or whatever image your pod is using
volumeMounts:
- name: shared-data # adjust volume name and mountPath
mountPath: /data # to match your pod spec
command: ['chmod', '0777', '/data']
</code>
</p></div>

### Relate to Charmed Kubernetes

Making **Charmed Kubernetes** aware of your **Ceph** cluster requires 2 **Juju** relations.
Expand Down