diff --git a/deploy/charts/rook-ceph-cluster/templates/securityContextConstraints.yaml b/deploy/charts/rook-ceph-cluster/templates/securityContextConstraints.yaml index 82a0bc363..016546f8b 100644 --- a/deploy/charts/rook-ceph-cluster/templates/securityContextConstraints.yaml +++ b/deploy/charts/rook-ceph-cluster/templates/securityContextConstraints.yaml @@ -8,10 +8,13 @@ metadata: allowPrivilegedContainer: true allowHostDirVolumePlugin: true allowHostPID: false -# set to true if running rook with host networking enabled +{{- if eq .Values.cephClusterSpec.network.provider "host" }} +allowHostNetwork: true +allowHostPorts: true +{{- else }} allowHostNetwork: false -# set to true if running rook with the provider as host allowHostPorts: false +{{- end }} priority: allowedCapabilities: ["MKNOD"] allowHostIPC: true diff --git a/deploy/charts/rook-ceph/templates/securityContextConstraints.yaml b/deploy/charts/rook-ceph/templates/securityContextConstraints.yaml index e84ce8934..b4b6cc5fb 100644 --- a/deploy/charts/rook-ceph/templates/securityContextConstraints.yaml +++ b/deploy/charts/rook-ceph/templates/securityContextConstraints.yaml @@ -8,10 +8,13 @@ metadata: allowPrivilegedContainer: true allowHostDirVolumePlugin: true allowHostPID: false -# set to true if running rook with host networking enabled +{{- if .Values.useOperatorHostNetwork }} +allowHostNetwork: true +allowHostPorts: true +{{- else }} allowHostNetwork: false -# set to true if running rook with the provider as host allowHostPorts: false +{{- end }} priority: allowedCapabilities: ["MKNOD"] allowHostIPC: true