Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
b548d92b
Unverified
Commit
b548d92b
authored
Nov 28, 2018
by
k8s-ci-robot
Committed by
GitHub
Nov 28, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #70392 from harsh-px/cfg-port
Lookup PX api port from k8s service
parents
3faeb7ba
fdc60629
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
portworx.go
pkg/volume/portworx/portworx.go
+13
-2
portworx_util.go
pkg/volume/portworx/portworx_util.go
+0
-0
No files found.
pkg/volume/portworx/portworx.go
View file @
b548d92b
...
@@ -20,6 +20,7 @@ import (
...
@@ -20,6 +20,7 @@ import (
"fmt"
"fmt"
"os"
"os"
volumeclient
"github.com/libopenstorage/openstorage/api/client/volume"
"k8s.io/api/core/v1"
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
"k8s.io/apimachinery/pkg/api/resource"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
...
@@ -43,7 +44,7 @@ func ProbeVolumePlugins() []volume.VolumePlugin {
...
@@ -43,7 +44,7 @@ func ProbeVolumePlugins() []volume.VolumePlugin {
type
portworxVolumePlugin
struct
{
type
portworxVolumePlugin
struct
{
host
volume
.
VolumeHost
host
volume
.
VolumeHost
util
*
P
ortworxVolumeUtil
util
*
p
ortworxVolumeUtil
}
}
var
_
volume
.
VolumePlugin
=
&
portworxVolumePlugin
{}
var
_
volume
.
VolumePlugin
=
&
portworxVolumePlugin
{}
...
@@ -61,8 +62,18 @@ func getPath(uid types.UID, volName string, host volume.VolumeHost) string {
...
@@ -61,8 +62,18 @@ func getPath(uid types.UID, volName string, host volume.VolumeHost) string {
}
}
func
(
plugin
*
portworxVolumePlugin
)
Init
(
host
volume
.
VolumeHost
)
error
{
func
(
plugin
*
portworxVolumePlugin
)
Init
(
host
volume
.
VolumeHost
)
error
{
client
,
err
:=
volumeclient
.
NewDriverClient
(
fmt
.
Sprintf
(
"http://%s:%d"
,
host
.
GetHostName
(),
osdMgmtDefaultPort
),
pxdDriverName
,
osdDriverVersion
,
pxDriverName
)
if
err
!=
nil
{
return
err
}
plugin
.
host
=
host
plugin
.
host
=
host
plugin
.
util
=
&
PortworxVolumeUtil
{}
plugin
.
util
=
&
portworxVolumeUtil
{
portworxClient
:
client
,
}
return
nil
return
nil
}
}
...
...
pkg/volume/portworx/portworx_util.go
View file @
b548d92b
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment