Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add flag to configure the registration socket path
  • Loading branch information
Prithvi Ramesh committed Aug 7, 2020
commit 1d93f398399f6ab5b9feaa6fb400fb61086997da
1 change: 1 addition & 0 deletions cmd/csi-node-driver-registrar/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const (
var (
connectionTimeout = flag.Duration("connection-timeout", 0, "The --connection-timeout flag is deprecated")
csiAddress = flag.String("csi-address", "/run/csi/socket", "Path of the CSI driver socket that the node-driver-registrar will connect to.")
pluginRegistrationPath = flag.String("plugin-registration-path", "/registration", "Path to Kubernetes plugin registration directory.")
kubeletRegistrationPath = flag.String("kubelet-registration-path", "", "Path of the CSI driver socket on the Kubernetes host machine.")
showVersion = flag.Bool("version", false, "Show version.")
version = "unknown"
Expand Down
2 changes: 1 addition & 1 deletion cmd/csi-node-driver-registrar/node_register.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func nodeRegister(
}

func buildSocketPath(csiDriverName string) string {
return fmt.Sprintf("/registration/%s-reg.sock", csiDriverName)
return fmt.Sprintf("%s/%s-reg.sock", *pluginRegistrationPath, csiDriverName)
}

func removeRegSocket(csiDriverName string) {
Expand Down