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

docs: add design for enforcing host network. #170

Merged
merged 1 commit into from
Nov 14, 2024
Merged
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
45 changes: 45 additions & 0 deletions docs/design/hostNetwork.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Enabling host networking for controller plugin pods

By default, the Ceph-CSI controller plugins operate on the pod network
but under some circumstances, like setups with a dedicated storage network,
where the pod network cannot connect to the ceph cluster,
it is necessary to run the Ceph-CSI controller plugin pods on the host network.

This document describes how the ceph-csi-operator can be configured to enforce the use of host network
in the Ceph-CSI controller plugin pods

The use of host networking can be enabled for a driver's controller plugin by setting `hostNetwork` to `true`in the `ControllerPlugin` section of the corresponding Driver CR.
obnoxxx marked this conversation as resolved.
Show resolved Hide resolved

The `hostNetwork` setting is also available in the `driverSpecDefaults.controllerPlugin` section
of the `OperatorConfig` CR. As this is a default for all Ceph-CSI controller plugins created by the operator, the setting
in concrete Driver CRs will take precedence.

There is currently no means of enforcing the use of host networking on all controller plugins against `Driver` CR settings.

Madhu-1 marked this conversation as resolved.
Show resolved Hide resolved
Example:

Madhu-1 marked this conversation as resolved.
Show resolved Hide resolved
## OperatorConfig CR

```yaml
kind: OperatorConfig
apiVersion: csi.ceph.io/v1alpha1
metadata:
name: ceph-csi-operator-config
namespace: <operator-namespace>
spec:
driverSpecDefaults:
controllerPlugin:
hostNetwork: true
Madhu-1 marked this conversation as resolved.
Show resolved Hide resolved
```
## Driver CR

```yaml
Madhu-1 marked this conversation as resolved.
Show resolved Hide resolved
apiVersion: csi.ceph.io/v1alpha1
kind: Driver
metadata:
name: rbd.csi.ceph.com
namespace: <operator-namespace>
spec:
controllerPlugin:
hostNetwork: false
Madhu-1 marked this conversation as resolved.
Show resolved Hide resolved
```
Loading