Skip to content

Commit

Permalink
Merge pull request kubernetes-csi#198 from Madhu-1/fix-redundant
Browse files Browse the repository at this point in the history
Remove redundant else block
  • Loading branch information
k8s-ci-robot authored Jan 4, 2019
2 parents d0e4880 + 7334d3c commit 237b54e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,12 +443,12 @@ func getVolumeCapability(
AccessType: getAccessTypeBlock(),
AccessMode: getAccessMode(pvcAccessMode),
}
} else {
return &csi.VolumeCapability{
AccessType: getAccessTypeMount(fsType, pvcOptions.MountOptions),
AccessMode: getAccessMode(pvcAccessMode),
}
}
return &csi.VolumeCapability{
AccessType: getAccessTypeMount(fsType, pvcOptions.MountOptions),
AccessMode: getAccessMode(pvcAccessMode),
}

}

func (p *csiProvisioner) Provision(options controller.VolumeOptions) (*v1.PersistentVolume, error) {
Expand Down Expand Up @@ -815,21 +815,21 @@ func verifyAndGetSecretNameAndNamespaceTemplate(secret deprecatedSecretParamsMap

if t, ok := storageClassParams[secret.deprecatedSecretNameKey]; ok {
nameTemplate = t
numName += 1
numName++
glog.Warning(deprecationWarning(secret.deprecatedSecretNameKey, secret.secretNameKey, ""))
}
if t, ok := storageClassParams[secret.deprecatedSecretNamespaceKey]; ok {
namespaceTemplate = t
numNamespace += 1
numNamespace++
glog.Warning(deprecationWarning(secret.deprecatedSecretNamespaceKey, secret.secretNamespaceKey, ""))
}
if t, ok := storageClassParams[secret.secretNameKey]; ok {
nameTemplate = t
numName += 1
numName++
}
if t, ok := storageClassParams[secret.secretNamespaceKey]; ok {
namespaceTemplate = t
numNamespace += 1
numNamespace++
}

if numName > 1 || numNamespace > 1 {
Expand Down

0 comments on commit 237b54e

Please sign in to comment.