Skip to content

Commit e4f4e17

Browse files
committed
refine logging and unnecessary changes
1 parent ad03a5f commit e4f4e17

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

cmd/sidecar_mounter/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ func main() {
5757
ctx, cancel := context.WithCancel(context.Background())
5858

5959
flagsFromDriver := map[string]string{}
60-
volumePath := *volumeBasePath + driver.FlagFileForDefaultingPath
61-
klog.Infof("Checking if defaulting-flag file exists: %v", volumePath)
62-
if _, err := os.Stat(volumePath); err == nil {
63-
machineTypeBytes, err := os.ReadFile(volumePath)
60+
defaultingFlagFilePath := *volumeBasePath + driver.FlagFileForDefaultingPath
61+
klog.Infof("Checking if defaulting-flag file exists: %v", defaultingFlagFilePath)
62+
if _, err := os.Stat(defaultingFlagFilePath); err == nil {
63+
machineTypeBytes, err := os.ReadFile(defaultingFlagFilePath)
6464
if err != nil {
6565
klog.Fatalf("failed to read defaulting-flag file: %v", err)
6666
}

pkg/csi_driver/node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ func (s *nodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublish
191191
return nil, status.Error(codes.Internal, err.Error())
192192
}
193193
} else {
194-
klog.Warningf("Unable to fetch node %v's machine type", node.Name)
194+
klog.Warningf("Unable to fetch target node %v's machine type", node.Name)
195195
}
196196

197197
// Check if there is any error from the gcsfuse

pkg/webhook/config.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929

3030
type Config struct {
3131
ShouldInjectSAVolume bool `json:"-"`
32-
DisableAutoconfig bool `json:"-"`
3332
PodHostNetworkSetting bool `json:"-"`
3433
ContainerImage string `json:"-"`
3534
ImagePullPolicy string `json:"-"`

0 commit comments

Comments
 (0)