Skip to content

Commit

Permalink
Merge pull request rook#14791 from travisn/helm-host-network
Browse files Browse the repository at this point in the history
helm: Add enforce host network setting
  • Loading branch information
travisn authored Oct 2, 2024
2 parents b2d2dc7 + 810de39 commit fc2ac66
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions Documentation/Helm-Charts/operator-chart.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"` |
Expand Down
4 changes: 4 additions & 0 deletions deploy/charts/rook-ceph/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
3 changes: 3 additions & 0 deletions deploy/charts/rook-ceph/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions deploy/examples/operator-openshift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
---
Expand Down
4 changes: 4 additions & 0 deletions deploy/examples/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
---
Expand Down
2 changes: 2 additions & 0 deletions tests/framework/installer/ceph_helm_installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit fc2ac66

Please sign in to comment.