diff --git a/Documentation/Helm-Charts/operator-chart.md b/Documentation/Helm-Charts/operator-chart.md index 1951fdd90..4fb98fd58 100644 --- a/Documentation/Helm-Charts/operator-chart.md +++ b/Documentation/Helm-Charts/operator-chart.md @@ -149,6 +149,7 @@ The following table lists the configurable parameters of the rook-operator chart | `discoveryDaemonInterval` | Set the discovery daemon device discovery interval (default to 60m) | `"60m"` | | `enableDiscoveryDaemon` | Enable discovery daemon | `false` | | `enableOBCWatchOperatorNamespace` | Whether the OBC provisioner should watch on the operator namespace or not, if not the namespace of the cluster will be used | `true` | +| `enforceHostNetwork` | Whether to create all Rook pods to run on the host network, for example in environments where a CNI is not enabled | `false` | | `hostpathRequiresPrivileged` | Runs Ceph Pods as privileged to be able to write to `hostPaths` in OpenShift with SELinux restrictions. | `false` | | `image.pullPolicy` | Image pull policy | `"IfNotPresent"` | | `image.repository` | Image | `"docker.io/rook/ceph"` | diff --git a/deploy/charts/rook-ceph/templates/configmap.yaml b/deploy/charts/rook-ceph/templates/configmap.yaml index f0f8987dc..c29dbcd74 100644 --- a/deploy/charts/rook-ceph/templates/configmap.yaml +++ b/deploy/charts/rook-ceph/templates/configmap.yaml @@ -23,6 +23,10 @@ data: {{- if .Values.revisionHistoryLimit }} ROOK_REVISION_HISTORY_LIMIT: {{ .Values.revisionHistoryLimit | quote }} {{- end }} +{{- if .Values.enforceHostNetwork }} + ROOK_ENFORCE_HOST_NETWORK: {{ .Values.enforceHostNetwork | quote }} +{{- end }} + {{- if .Values.csi }} ROOK_CSI_ENABLE_RBD: {{ .Values.csi.enableRbdDriver | quote }} ROOK_CSI_ENABLE_CEPHFS: {{ .Values.csi.enableCephfsDriver | quote }} diff --git a/deploy/charts/rook-ceph/values.yaml b/deploy/charts/rook-ceph/values.yaml index fb2803da1..bee21582e 100644 --- a/deploy/charts/rook-ceph/values.yaml +++ b/deploy/charts/rook-ceph/values.yaml @@ -633,6 +633,9 @@ discover: # -- Runs Ceph Pods as privileged to be able to write to `hostPaths` in OpenShift with SELinux restrictions. hostpathRequiresPrivileged: false +# -- Whether to create all Rook pods to run on the host network, for example in environments where a CNI is not enabled +enforceHostNetwork: false + # -- Disable automatic orchestration when new devices are discovered. disableDeviceHotplug: false diff --git a/deploy/examples/operator-openshift.yaml b/deploy/examples/operator-openshift.yaml index df81d2530..7ea0259f0 100644 --- a/deploy/examples/operator-openshift.yaml +++ b/deploy/examples/operator-openshift.yaml @@ -638,6 +638,10 @@ data: # (Optional) QPS to use while communicating with the kubernetes apiserver. # CSI_KUBE_API_QPS: "5.0" + + # Whether to create all Rook pods to run on the host network, for example in environments where a CNI is not enabled + ROOK_ENFORCE_HOST_NETWORK: "false" + # RevisionHistoryLimit value for all deployments created by rook. # ROOK_REVISION_HISTORY_LIMIT: "3" --- diff --git a/deploy/examples/operator.yaml b/deploy/examples/operator.yaml index 347524e13..b290dd2e9 100644 --- a/deploy/examples/operator.yaml +++ b/deploy/examples/operator.yaml @@ -568,6 +568,10 @@ data: # (Optional) QPS to use while communicating with the kubernetes apiserver. # CSI_KUBE_API_QPS: "5.0" + + # Whether to create all Rook pods to run on the host network, for example in environments where a CNI is not enabled + ROOK_ENFORCE_HOST_NETWORK: "false" + # RevisionHistoryLimit value for all deployments created by rook. # ROOK_REVISION_HISTORY_LIMIT: "3" --- diff --git a/tests/framework/installer/ceph_helm_installer.go b/tests/framework/installer/ceph_helm_installer.go index a8042469c..13d1c69fb 100644 --- a/tests/framework/installer/ceph_helm_installer.go +++ b/tests/framework/installer/ceph_helm_installer.go @@ -57,6 +57,8 @@ func (h *CephInstaller) configureRookOperatorViaHelm(upgrade bool) error { "enableDiscoveryDaemon": h.settings.EnableDiscovery, "image": map[string]interface{}{"tag": h.settings.RookVersion}, "monitoring": map[string]interface{}{"enabled": true}, + "revisionHistoryLimit": "3", + "enforceHostNetwork": "false", } values["csi"] = map[string]interface{}{ "csiRBDProvisionerResource": nil,