mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 03:03:59 +00:00
node: sample-dp: set default value for pluginSocksDir
Setting a reasonable default in case `PLUGIN_SOCK_DIR` environment variable is not specified. Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
This commit is contained in:
parent
211d8cc80a
commit
f46cdf1428
@ -93,8 +93,7 @@ func main() {
|
|||||||
pluginSocksDir := os.Getenv("PLUGIN_SOCK_DIR")
|
pluginSocksDir := os.Getenv("PLUGIN_SOCK_DIR")
|
||||||
klog.Infof("pluginSocksDir: %s", pluginSocksDir)
|
klog.Infof("pluginSocksDir: %s", pluginSocksDir)
|
||||||
if pluginSocksDir == "" {
|
if pluginSocksDir == "" {
|
||||||
klog.Errorf("Empty pluginSocksDir")
|
pluginSocksDir = pluginapi.DevicePluginPath
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
socketPath := pluginSocksDir + "/dp." + fmt.Sprintf("%d", time.Now().Unix())
|
socketPath := pluginSocksDir + "/dp." + fmt.Sprintf("%d", time.Now().Unix())
|
||||||
|
Loading…
Reference in New Issue
Block a user