From ab8fd90aa642ea670fd8786e4b9bbb04b6beb8e2 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 26 Sep 2024 14:11:53 +0200 Subject: [PATCH 1/3] core: add ROOK_REVISION_HISTORY_LIMIT operator setting This adds an operator config setting ROOK_REVISION_HISTORY_LIMIT defaulting to kubernetes'value for RevisionHistoryLimit. If configured, the provided value will be used as RevisionHistoryLimit for all Deployments rook creates. Fixes: #12722 Signed-off-by: Michael Adam --- deploy/examples/operator-openshift.yaml | 2 ++ deploy/examples/operator.yaml | 2 ++ pkg/operator/ceph/cluster/mgr/spec.go | 1 + pkg/operator/ceph/cluster/mon/spec.go | 1 + .../ceph/cluster/nodedaemon/exporter.go | 1 + pkg/operator/ceph/cluster/osd/spec.go | 1 + pkg/operator/ceph/cluster/rbd/spec.go | 1 + pkg/operator/ceph/controller.go | 1 + .../ceph/controller/controller_utils.go | 26 +++++++++++++++++- .../ceph/controller/controller_utils_test.go | 27 +++++++++++++++++++ pkg/operator/ceph/file/mds/spec.go | 5 ++-- pkg/operator/ceph/file/mirror/spec.go | 1 + pkg/operator/ceph/nfs/spec.go | 1 + pkg/operator/ceph/object/cosi/spec.go | 5 ++-- pkg/operator/ceph/object/spec.go | 1 + pkg/operator/discover/discover.go | 1 + 16 files changed, 71 insertions(+), 6 deletions(-) diff --git a/deploy/examples/operator-openshift.yaml b/deploy/examples/operator-openshift.yaml index 82ed8f14f141..105434007652 100644 --- a/deploy/examples/operator-openshift.yaml +++ b/deploy/examples/operator-openshift.yaml @@ -638,6 +638,8 @@ data: # (Optional) QPS to use while communicating with the kubernetes apiserver. # CSI_KUBE_API_QPS: "5.0" + # RevisionHistoryLimit value for all deployments created by rook. + # ROOK_REVISION_HISTORY_LIMIT: "3" --- # The deployment for the rook operator # OLM: BEGIN OPERATOR DEPLOYMENT diff --git a/deploy/examples/operator.yaml b/deploy/examples/operator.yaml index e0faa4d2a6b4..4802f5658f20 100644 --- a/deploy/examples/operator.yaml +++ b/deploy/examples/operator.yaml @@ -568,6 +568,8 @@ data: # (Optional) QPS to use while communicating with the kubernetes apiserver. # CSI_KUBE_API_QPS: "5.0" + # RevisionHistoryLimit value for all deployments created by rook. + # ROOK_REVISION_HISTORY_LIMIT: "3" --- # OLM: BEGIN OPERATOR DEPLOYMENT apiVersion: apps/v1 diff --git a/pkg/operator/ceph/cluster/mgr/spec.go b/pkg/operator/ceph/cluster/mgr/spec.go index 01cfb5f2b617..1c38893d0789 100644 --- a/pkg/operator/ceph/cluster/mgr/spec.go +++ b/pkg/operator/ceph/cluster/mgr/spec.go @@ -128,6 +128,7 @@ func (c *Cluster) makeDeployment(mgrConfig *mgrConfig) (*apps.Deployment, error) Labels: c.getPodLabels(mgrConfig, true), }, Spec: apps.DeploymentSpec{ + RevisionHistoryLimit: controller.RevisionHistoryLimit(), Selector: &metav1.LabelSelector{ MatchLabels: c.getPodLabels(mgrConfig, false), }, diff --git a/pkg/operator/ceph/cluster/mon/spec.go b/pkg/operator/ceph/cluster/mon/spec.go index 9d79ace7ba4e..8901f26bd919 100644 --- a/pkg/operator/ceph/cluster/mon/spec.go +++ b/pkg/operator/ceph/cluster/mon/spec.go @@ -108,6 +108,7 @@ func (c *Cluster) makeDeployment(monConfig *monConfig, canary bool) (*apps.Deplo } replicaCount := int32(1) d.Spec = apps.DeploymentSpec{ + RevisionHistoryLimit: controller.RevisionHistoryLimit(), Selector: &metav1.LabelSelector{ MatchLabels: c.getLabels(monConfig, canary, false), }, diff --git a/pkg/operator/ceph/cluster/nodedaemon/exporter.go b/pkg/operator/ceph/cluster/nodedaemon/exporter.go index dec1809eb163..ab4debc27ef1 100644 --- a/pkg/operator/ceph/cluster/nodedaemon/exporter.go +++ b/pkg/operator/ceph/cluster/nodedaemon/exporter.go @@ -77,6 +77,7 @@ func (r *ReconcileNode) createOrUpdateCephExporter(node corev1.Node, tolerations Namespace: cephCluster.GetNamespace(), }, } + deploy.Spec.RevisionHistoryLimit = controller.RevisionHistoryLimit() err := controllerutil.SetControllerReference(&cephCluster, deploy, r.scheme) if err != nil { return controllerutil.OperationResultNone, errors.Errorf("failed to set owner reference of ceph-exporter deployment %q", deploy.Name) diff --git a/pkg/operator/ceph/cluster/osd/spec.go b/pkg/operator/ceph/cluster/osd/spec.go index b44aa4ee3225..33477cdbf88b 100644 --- a/pkg/operator/ceph/cluster/osd/spec.go +++ b/pkg/operator/ceph/cluster/osd/spec.go @@ -713,6 +713,7 @@ func (c *Cluster) makeDeployment(osdProps osdProperties, osd *OSDInfo, provision OsdIdLabelKey: fmt.Sprintf("%d", osd.ID), }, }, + RevisionHistoryLimit: controller.RevisionHistoryLimit(), Strategy: apps.DeploymentStrategy{ Type: apps.RecreateDeploymentStrategyType, }, diff --git a/pkg/operator/ceph/cluster/rbd/spec.go b/pkg/operator/ceph/cluster/rbd/spec.go index 2b846eae826d..dd627232b2f1 100644 --- a/pkg/operator/ceph/cluster/rbd/spec.go +++ b/pkg/operator/ceph/cluster/rbd/spec.go @@ -82,6 +82,7 @@ func (r *ReconcileCephRBDMirror) makeDeployment(daemonConfig *daemonConfig, rbdM Labels: controller.CephDaemonAppLabels(AppName, rbdMirror.Namespace, config.RbdMirrorType, daemonConfig.DaemonID, rbdMirror.Name, "cephrbdmirrors.ceph.rook.io", true), }, Spec: apps.DeploymentSpec{ + RevisionHistoryLimit: controller.RevisionHistoryLimit(), Selector: &metav1.LabelSelector{ MatchLabels: podSpec.Labels, }, diff --git a/pkg/operator/ceph/controller.go b/pkg/operator/ceph/controller.go index 238dd29bd43b..c674854a5727 100644 --- a/pkg/operator/ceph/controller.go +++ b/pkg/operator/ceph/controller.go @@ -133,6 +133,7 @@ func (r *ReconcileConfig) reconcile(request reconcile.Request) (reconcile.Result opcontroller.SetAllowLoopDevices(r.config.Parameters) opcontroller.SetEnforceHostNetwork(r.config.Parameters) + opcontroller.SetRevisionHistoryLimit(r.config.Parameters) logger.Infof("%s done reconciling", controllerName) return reconcile.Result{}, nil diff --git a/pkg/operator/ceph/controller/controller_utils.go b/pkg/operator/ceph/controller/controller_utils.go index f5cc1ca1da27..9d5e207522c4 100644 --- a/pkg/operator/ceph/controller/controller_utils.go +++ b/pkg/operator/ceph/controller/controller_utils.go @@ -54,6 +54,9 @@ const ( enforceHostNetworkSettingName string = "ROOK_ENFORCE_HOST_NETWORK" enforceHostNetworkDefaultValue string = "false" + revisionHistoryLimitSettingName string = "ROOK_REVISION_HISTORY_LIMIT" + revisionHistoryLimitDefaultValue string = "" + // UninitializedCephConfigError refers to the error message printed by the Ceph CLI when there is no ceph configuration file // This typically is raised when the operator has not finished initializing UninitializedCephConfigError = "error calling conf_read_file" @@ -86,7 +89,8 @@ var ( OperatorCephBaseImageVersion string // loopDevicesAllowed indicates whether loop devices are allowed to be used - loopDevicesAllowed = false + loopDevicesAllowed = false + revisionHistoryLimit *int32 = nil ) func DiscoveryDaemonEnabled(data map[string]string) bool { @@ -133,6 +137,26 @@ func EnforceHostNetwork() bool { return cephv1.EnforceHostNetwork() } +func SetRevisionHistoryLimit(data map[string]string) { + strval := k8sutil.GetValue(data, revisionHistoryLimitSettingName, revisionHistoryLimitDefaultValue) + if strval != "" { + numval, err := strconv.ParseInt(strval, 10, 32) + if err != nil { + logger.Warningf("failed to parse value %q for %q. assuming default value.", strval, revisionHistoryLimitSettingName) + revisionHistoryLimit = nil + return + + } + limit := int32(numval) + revisionHistoryLimit = &limit + } + +} + +func RevisionHistoryLimit() *int32 { + return revisionHistoryLimit +} + // canIgnoreHealthErrStatusInReconcile determines whether a status of HEALTH_ERR in the CephCluster can be ignored safely. func canIgnoreHealthErrStatusInReconcile(cephCluster cephv1.CephCluster, controllerName string) bool { // Get a list of all the keys causing the HEALTH_ERR status. diff --git a/pkg/operator/ceph/controller/controller_utils_test.go b/pkg/operator/ceph/controller/controller_utils_test.go index 532cc0bcbecc..82774c8c7e06 100644 --- a/pkg/operator/ceph/controller/controller_utils_test.go +++ b/pkg/operator/ceph/controller/controller_utils_test.go @@ -133,6 +133,33 @@ func TestSetEnforceHostNetwork(t *testing.T) { assert.False(t, EnforceHostNetwork()) } +func TestSetRevisionHistoryLimit(t *testing.T) { + opConfig := map[string]string{} + t.Run("ROOK_REVISION_HISTORY_LIMIT: test default value", func(t *testing.T) { + SetRevisionHistoryLimit(opConfig) + assert.Nil(t, RevisionHistoryLimit()) + }) + + var value string = "foo" + t.Run("ROOK_REVISION_HISTORY_LIMIT: test invalid value 'foo'", func(t *testing.T) { + opConfig[revisionHistoryLimitSettingName] = value + SetRevisionHistoryLimit(opConfig) + assert.Nil(t, RevisionHistoryLimit()) + }) + + t.Run("ROOK_REVISION_HISTORY_LIMIT: test empty string value", func(t *testing.T) { + value = "" + opConfig[revisionHistoryLimitSettingName] = value + SetRevisionHistoryLimit(opConfig) + assert.Nil(t, RevisionHistoryLimit()) + }) + t.Run("ROOK_REVISION_HISTORY_LIMIT: test valig value '10'", func(t *testing.T) { + value = "10" + opConfig[revisionHistoryLimitSettingName] = value + SetRevisionHistoryLimit(opConfig) + assert.Equal(t, int32(10), *RevisionHistoryLimit()) + }) +} func TestIsReadyToReconcile(t *testing.T) { scheme := scheme.Scheme scheme.AddKnownTypes(cephv1.SchemeGroupVersion, &cephv1.CephCluster{}, &cephv1.CephClusterList{}) diff --git a/pkg/operator/ceph/file/mds/spec.go b/pkg/operator/ceph/file/mds/spec.go index 426957a2409c..31065deef622 100644 --- a/pkg/operator/ceph/file/mds/spec.go +++ b/pkg/operator/ceph/file/mds/spec.go @@ -94,8 +94,9 @@ func (c *Cluster) makeDeployment(mdsConfig *mdsConfig, fsNamespacedname types.Na Selector: &metav1.LabelSelector{ MatchLabels: c.podLabels(mdsConfig, false), }, - Template: podSpec, - Replicas: &replicas, + RevisionHistoryLimit: controller.RevisionHistoryLimit(), + Template: podSpec, + Replicas: &replicas, Strategy: apps.DeploymentStrategy{ Type: apps.RecreateDeploymentStrategyType, }, diff --git a/pkg/operator/ceph/file/mirror/spec.go b/pkg/operator/ceph/file/mirror/spec.go index 8e9153b5bc28..d13d1848bec9 100644 --- a/pkg/operator/ceph/file/mirror/spec.go +++ b/pkg/operator/ceph/file/mirror/spec.go @@ -79,6 +79,7 @@ func (r *ReconcileFilesystemMirror) makeDeployment(daemonConfig *daemonConfig, f Annotations: fsMirror.Spec.Annotations, Labels: controller.CephDaemonAppLabels(AppName, fsMirror.Namespace, config.FilesystemMirrorType, userID, fsMirror.Name, "cephfilesystemmirrors.ceph.rook.io", true)}, Spec: apps.DeploymentSpec{ + RevisionHistoryLimit: controller.RevisionHistoryLimit(), Selector: &metav1.LabelSelector{ MatchLabels: podSpec.Labels, }, diff --git a/pkg/operator/ceph/nfs/spec.go b/pkg/operator/ceph/nfs/spec.go index 10edf9399f6c..5834acf5c781 100644 --- a/pkg/operator/ceph/nfs/spec.go +++ b/pkg/operator/ceph/nfs/spec.go @@ -191,6 +191,7 @@ func (r *ReconcileCephNFS) makeDeployment(nfs *cephv1.CephNFS, cfg daemonConfig) // Multiple replicas of the nfs service would be handled by creating a service and a new deployment for each one, rather than increasing the pod count here replicas := int32(1) deployment.Spec = apps.DeploymentSpec{ + RevisionHistoryLimit: controller.RevisionHistoryLimit(), Selector: &metav1.LabelSelector{ MatchLabels: getLabels(nfs, cfg.ID, false), }, diff --git a/pkg/operator/ceph/object/cosi/spec.go b/pkg/operator/ceph/object/cosi/spec.go index 50bf737c5bab..f0cc0a5a990e 100644 --- a/pkg/operator/ceph/object/cosi/spec.go +++ b/pkg/operator/ceph/object/cosi/spec.go @@ -43,7 +43,6 @@ func createCephCOSIDriverDeployment(cephCOSIDriver *cephv1.CephCOSIDriver) (*app replica := int32(1) minReadySeconds := int32(30) progressDeadlineSeconds := int32(600) - revisionHistoryLimit := int32(3) cephcosidriverDeployment := &appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ @@ -52,7 +51,8 @@ func createCephCOSIDriverDeployment(cephCOSIDriver *cephv1.CephCOSIDriver) (*app Labels: getCOSILabels(cephCOSIDriver.Name, cephCOSIDriver.Namespace), }, Spec: appsv1.DeploymentSpec{ - Replicas: &replica, + RevisionHistoryLimit: controller.RevisionHistoryLimit(), + Replicas: &replica, Selector: &metav1.LabelSelector{ MatchLabels: getCOSILabels(cephCOSIDriver.Name, cephCOSIDriver.Namespace), }, @@ -60,7 +60,6 @@ func createCephCOSIDriverDeployment(cephCOSIDriver *cephv1.CephCOSIDriver) (*app Strategy: strategy, MinReadySeconds: minReadySeconds, ProgressDeadlineSeconds: &progressDeadlineSeconds, - RevisionHistoryLimit: &revisionHistoryLimit, }, } diff --git a/pkg/operator/ceph/object/spec.go b/pkg/operator/ceph/object/spec.go index cd34dab8d9fa..b72910fb9b55 100644 --- a/pkg/operator/ceph/object/spec.go +++ b/pkg/operator/ceph/object/spec.go @@ -117,6 +117,7 @@ func (c *clusterConfig) createDeployment(rgwConfig *rgwConfig) (*apps.Deployment Labels: getLabels(c.store.Name, c.store.Namespace, true), }, Spec: apps.DeploymentSpec{ + RevisionHistoryLimit: controller.RevisionHistoryLimit(), Selector: &metav1.LabelSelector{ MatchLabels: getLabels(c.store.Name, c.store.Namespace, false), }, diff --git a/pkg/operator/discover/discover.go b/pkg/operator/discover/discover.go index ee4cdb3f6369..b895badd7e84 100644 --- a/pkg/operator/discover/discover.go +++ b/pkg/operator/discover/discover.go @@ -102,6 +102,7 @@ func (d *Discover) createDiscoverDaemonSet(ctx context.Context, namespace, disco Labels: getLabels(), }, Spec: apps.DaemonSetSpec{ + RevisionHistoryLimit: opcontroller.RevisionHistoryLimit(), Selector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "app": discoverDaemonsetName, From 20f00312805a2b17fb89a465614f931e19a12567 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 2 Oct 2024 16:23:42 +0200 Subject: [PATCH 2/3] helm: add revisionHistoryLimit setting Co-authored-by: Travis Nielsen Signed-off-by: Michael Adam --- Documentation/Helm-Charts/operator-chart.md | 1 + deploy/charts/rook-ceph/templates/configmap.yaml | 3 +++ deploy/charts/rook-ceph/values.yaml | 3 +++ 3 files changed, 7 insertions(+) diff --git a/Documentation/Helm-Charts/operator-chart.md b/Documentation/Helm-Charts/operator-chart.md index ebb42204fb1f..07acac83603e 100644 --- a/Documentation/Helm-Charts/operator-chart.md +++ b/Documentation/Helm-Charts/operator-chart.md @@ -163,6 +163,7 @@ The following table lists the configurable parameters of the rook-operator chart | `rbacAggregate.enableOBCs` | If true, create a ClusterRole aggregated to [user facing roles](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles) for objectbucketclaims | `false` | | `rbacEnable` | If true, create & use RBAC resources | `true` | | `resources` | Pod resource requests & limits | `{"limits":{"memory":"512Mi"},"requests":{"cpu":"200m","memory":"128Mi"}}` | +| `revisionHistoryLimit` | The revision history limit for all pods created by Rook. If blank, the K8s default is 10. | `nil` | | `scaleDownOperator` | If true, scale down the rook operator. This is useful for administrative actions where the rook operator must be scaled down, while using gitops style tooling to deploy your helm charts. | `false` | | `tolerations` | List of Kubernetes [`tolerations`](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) to add to the Deployment. | `[]` | | `unreachableNodeTolerationSeconds` | Delay to use for the `node.kubernetes.io/unreachable` pod failure toleration to override the Kubernetes default of 5 minutes | `5` | diff --git a/deploy/charts/rook-ceph/templates/configmap.yaml b/deploy/charts/rook-ceph/templates/configmap.yaml index ea1c5230f107..f0f8987dc0d5 100644 --- a/deploy/charts/rook-ceph/templates/configmap.yaml +++ b/deploy/charts/rook-ceph/templates/configmap.yaml @@ -20,6 +20,9 @@ data: {{- if .Values.discoverDaemonUdev }} DISCOVER_DAEMON_UDEV_BLACKLIST: {{ .Values.discoverDaemonUdev | quote }} {{- end }} +{{- if .Values.revisionHistoryLimit }} + ROOK_REVISION_HISTORY_LIMIT: {{ .Values.revisionHistoryLimit | 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 4cf7c298d6a4..c630bcd33b23 100644 --- a/deploy/charts/rook-ceph/values.yaml +++ b/deploy/charts/rook-ceph/values.yaml @@ -636,6 +636,9 @@ hostpathRequiresPrivileged: false # -- Disable automatic orchestration when new devices are discovered. disableDeviceHotplug: false +# -- The revision history limit for all pods created by Rook. If blank, the K8s default is 10. +revisionHistoryLimit: + # -- Blacklist certain disks according to the regex provided. discoverDaemonUdev: From 810de394e7196a185b4544e98311109e1d1f305b Mon Sep 17 00:00:00 2001 From: Travis Nielsen Date: Wed, 2 Oct 2024 07:51:05 -0600 Subject: [PATCH 3/3] helm: add enforce host network setting The ROOK_ENFORCE_HOST_NETWORK option was implemented recently and now we add the helm setting to expose this new setting in the rook chart. Signed-off-by: Travis Nielsen --- Documentation/Helm-Charts/operator-chart.md | 1 + deploy/charts/rook-ceph/templates/configmap.yaml | 4 ++++ deploy/charts/rook-ceph/values.yaml | 3 +++ deploy/examples/operator-openshift.yaml | 4 ++++ deploy/examples/operator.yaml | 4 ++++ tests/framework/installer/ceph_helm_installer.go | 2 ++ 6 files changed, 18 insertions(+) diff --git a/Documentation/Helm-Charts/operator-chart.md b/Documentation/Helm-Charts/operator-chart.md index 07acac83603e..a78ddc1ad4e7 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 f0f8987dc0d5..c29dbcd74fc9 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 c630bcd33b23..7e3d47bb3c04 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 105434007652..876a029f0df3 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 4802f5658f20..667c718ba8b6 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 a8042469cae8..13d1c69fb63d 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,