From 7ee207b0fbd60c8d6b28363eb00fd169ed912de9 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Tue, 19 Mar 2019 14:45:34 -0400 Subject: [PATCH] ceph csi: tweak options handling around enabling csi Simplify one function and improve option wording. Signed-off-by: John Mulligan --- cmd/rook/ceph/operator.go | 4 ++-- pkg/operator/ceph/csi/spec.go | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cmd/rook/ceph/operator.go b/cmd/rook/ceph/operator.go index 14ec36e62..c0455ab25 100644 --- a/cmd/rook/ceph/operator.go +++ b/cmd/rook/ceph/operator.go @@ -43,8 +43,8 @@ func init() { operatorCmd.Flags().DurationVar(&mon.HealthCheckInterval, "mon-healthcheck-interval", mon.HealthCheckInterval, "mon health check interval (duration)") operatorCmd.Flags().DurationVar(&mon.MonOutTimeout, "mon-out-timeout", mon.MonOutTimeout, "mon out timeout (duration)") - operatorCmd.Flags().BoolVar(&csi.EnableRBD, "csi-enable-rbd", false, "whether enable ceph-csi rbd driver") - operatorCmd.Flags().BoolVar(&csi.EnableCephFS, "csi-enable-cephfs", false, "whether enable ceph-csi cephfs driver") + operatorCmd.Flags().BoolVar(&csi.EnableRBD, "csi-enable-rbd", false, "enable ceph-csi rbd support") + operatorCmd.Flags().BoolVar(&csi.EnableCephFS, "csi-enable-cephfs", false, "enable ceph-csi cephfs support") // csi images operatorCmd.Flags().StringVar(&csi.CSIParam.RBDPluginImage, "csi-rbd-image", csi.DefaultRBDPluginImage, "ceph-csi rbd plugin image") operatorCmd.Flags().StringVar(&csi.CSIParam.CephFSPluginImage, "csi-cephfs-image", csi.DefaultCephFSPluginImage, "ceph-csi cephfs plugin image") diff --git a/pkg/operator/ceph/csi/spec.go b/pkg/operator/ceph/csi/spec.go index c7230671b..7a7b53b77 100644 --- a/pkg/operator/ceph/csi/spec.go +++ b/pkg/operator/ceph/csi/spec.go @@ -73,10 +73,7 @@ const ( ) func CSIEnabled() bool { - if EnableRBD || EnableCephFS { - return true - } - return false + return EnableRBD || EnableCephFS } func SetCSINamespace(namespace string) {