Skip to content

Commit

Permalink
Fix misspell and gomft -s (#161)
Browse files Browse the repository at this point in the history
* Fix misspell and gomft -s

* Ignore gocycle
  • Loading branch information
asifdxtreme authored Nov 25, 2022
1 parent 9bb883e commit 3428a61
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions controllers/vdoconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ var (
// +kubebuilder:rbac:groups="",resources=configmaps,verbs=create;get;list;watch;update;patch;delete;
// +kubebuilder:rbac:groups=*,resources=namespaces,verbs=create;get;list;watch;update;patch;delete;

//gocyclo:ignore
func (r *VDOConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
r.Logger.Info("Inside VDOConfig reconciler", "name", req.NamespacedName)

Expand Down Expand Up @@ -355,6 +356,7 @@ func (r *VDOConfigReconciler) getVcSession(vdoctx vdocontext.VDOContext, config
return sess, nil
}

//gocyclo:ignore
func (r *VDOConfigReconciler) reconcileCPIConfiguration(vdoctx vdocontext.VDOContext, req ctrl.Request, vdoConfig *vdov1alpha1.VDOConfig, clientset *kubernetes.Clientset) (ctrl.Result, error) {

vsphereCloudConfigsList := vdoConfig.Spec.CloudProvider.VsphereCloudConfigs
Expand Down Expand Up @@ -450,6 +452,7 @@ func (r *VDOConfigReconciler) reconcileCPIConfiguration(vdoctx vdocontext.VDOCon
return ctrl.Result{}, nil
}

//gocyclo:ignore
func (r *VDOConfigReconciler) reconcileCSIConfiguration(vdoctx vdocontext.VDOContext, req ctrl.Request, vdoConfig *vdov1alpha1.VDOConfig, clientset *kubernetes.Clientset) (ctrl.Result, error) {

vsphereCloudConfig, err := r.fetchVSphereCloudConfig(vdoctx, vdoConfig.Spec.StorageProvider.VsphereCloudConfig, req.Namespace)
Expand Down Expand Up @@ -1414,6 +1417,7 @@ func (r *VDOConfigReconciler) getMatrixConfig(matrixConfigUrl, matrixConfigConte
}
}

//gocyclo:ignore
func (r *VDOConfigReconciler) updateCSIDaemonSet(ctx vdocontext.VDOContext, kubPath string) error {
ds := &appsv1.DaemonSet{}
kubeletDefaultPath := "/var/lib/kubelet"
Expand Down
2 changes: 1 addition & 1 deletion pkg/drivers/csi/csiutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var _ = Describe("TestSecretCreation", func() {
FileVolumes: v1alpha1.FileVolume{
VSanDataStoreUrl: []string{"ds:///vmfs/volumes/vsan:123/"},
NetPermissions: []v1alpha1.NetPermission{
v1alpha1.NetPermission{
{
Ip: "10.10.10.0/24",
Permission: "READ_WRITE",
RootSquash: true,
Expand Down
2 changes: 1 addition & 1 deletion pkg/session/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ var _ = Describe("vc session functions", func() {

networkSpec := types.CustomizationSpec{
NicSettingMap: []types.CustomizationAdapterMapping{
types.CustomizationAdapterMapping{
{
Adapter: types.CustomizationIPSettings{
Ip: &types.CustomizationFixedIp{
IpAddress: "192.168.1.100",
Expand Down
2 changes: 1 addition & 1 deletion vdoctl/cmd/drivers.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ var driversCmd = &cobra.Command{
configFlag := cm.Data["configured-by"]

if !strings.EqualFold(configFlag, UserConfig) {
isConfigRequired := utils.PromptGetInput("VDO is configured with default compatiblity matrix. you can update compatiblity-matrix using 'vdoctl update compatiblity-matrix'. Do you want to use the defaults for compatiblity matrix (Y/N) ? ", errors.New("invalid input"), utils.IsString)
isConfigRequired := utils.PromptGetInput("VDO is configured with default compatibility matrix. you can update compatibility-matrix using 'vdoctl update compatibility-matrix'. Do you want to use the defaults for compatibility matrix (Y/N) ? ", errors.New("invalid input"), utils.IsString)
if !strings.EqualFold(isConfigRequired, "Y") {
os.Exit(0)
}
Expand Down

0 comments on commit 3428a61

Please sign in to comment.