Skip to content

Commit

Permalink
Merge pull request #95 from prithviramesh/configurable-registration-s…
Browse files Browse the repository at this point in the history
…ocket-path

Add flag to configure the registration socket path
  • Loading branch information
k8s-ci-robot authored Aug 10, 2020
2 parents a0c2e6b + 1d93f39 commit 06867f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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

0 comments on commit 06867f3

Please sign in to comment.