Skip to content

Commit 40b9b25

Browse files
committed
fix comments
1 parent a922427 commit 40b9b25

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+5
-11424
lines changed

cmd/hostpathplugin/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ var (
3636
ephemeral = flag.Bool("ephemeral", false, "publish volumes in ephemeral mode even if kubelet did not ask for it (only needed for Kubernetes 1.15)")
3737
maxVolumesPerNode = flag.Int64("maxvolumespernode", 0, "limit of volumes per node")
3838
showVersion = flag.Bool("version", false, "Show version.")
39-
kubeconfig = flag.String("kubeconfig", "", "absolute path to the kubeconfig file")
4039
// Set by the build process
4140
version = ""
4241
)
@@ -59,7 +58,7 @@ func main() {
5958
}
6059

6160
func handle() {
62-
driver, err := hostpath.NewHostPathDriver(*driverName, *nodeID, *endpoint, *ephemeral, *maxVolumesPerNode, version, *kubeconfig)
61+
driver, err := hostpath.NewHostPathDriver(*driverName, *nodeID, *endpoint, *ephemeral, *maxVolumesPerNode, version)
6362
if err != nil {
6463
fmt.Printf("Failed to initialize driver: %s", err.Error())
6564
os.Exit(1)

pkg/hostpath/controllerserver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ func (cs *controllerServer) ListVolumes(ctx context.Context, req *csi.ListVolume
308308
for index := startIdx - 1; index < volumesLength && index < maxLength; index++ {
309309
hpVolume = hostPathVolumes[volumeIds[index]]
310310
healthy, msg := doHealthCheck(volumeIds[index])
311-
glog.V(3).Infof("Healthy state: %+v Volume: %+v", hpVolume.VolName, healthy)
311+
glog.V(3).Infof("Healthy state: %s Volume: %t", hpVolume.VolName, healthy)
312312
volumeRes.Entries = append(volumeRes.Entries, &csi.ListVolumesResponse_Entry{
313313
Volume: &csi.Volume{
314314
VolumeId: hpVolume.VolID,
@@ -335,7 +335,7 @@ func (cs *controllerServer) ControllerGetVolume(ctx context.Context, req *csi.Co
335335
}
336336

337337
healthy, msg := doHealthCheck(req.GetVolumeId())
338-
glog.V(3).Infof("Healthy state: %+v Volume: %+v", volume.VolName, healthy)
338+
glog.V(3).Infof("Healthy state: %s Volume: %t", volume.VolName, healthy)
339339
return &csi.ControllerGetVolumeResponse{
340340
Volume: &csi.Volume{
341341
VolumeId: volume.VolID,

pkg/hostpath/healthcheck.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func getSourcePath(volumeHandle string) string {
5757

5858
func checkSourcePathExist(volumeHandle string) (bool, error) {
5959
sourcePath := getSourcePath(volumeHandle)
60-
glog.V(3).Infof("Volume: %+v Source path is: %+v", volumeHandle, sourcePath)
60+
glog.V(3).Infof("Volume: %s Source path is: %s", volumeHandle, sourcePath)
6161
_, err := os.Stat(sourcePath)
6262
if err != nil {
6363
if os.IsNotExist(err) {

pkg/hostpath/hostpath.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func init() {
105105
hostPathVolumeSnapshots = map[string]hostPathSnapshot{}
106106
}
107107

108-
func NewHostPathDriver(driverName, nodeID, endpoint string, ephemeral bool, maxVolumesPerNode int64, version, kubeconfig string) (*hostPath, error) {
108+
func NewHostPathDriver(driverName, nodeID, endpoint string, ephemeral bool, maxVolumesPerNode int64, version string) (*hostPath, error) {
109109
if driverName == "" {
110110
return nil, errors.New("no driver name provided")
111111
}

vendor/github.com/imdario/mergo/.deepsource.toml

Lines changed: 0 additions & 12 deletions
This file was deleted.

vendor/github.com/imdario/mergo/.gitignore

Lines changed: 0 additions & 33 deletions
This file was deleted.

vendor/github.com/imdario/mergo/.travis.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md

Lines changed: 0 additions & 46 deletions
This file was deleted.

vendor/github.com/imdario/mergo/LICENSE

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)