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
650357ae
Unverified
Commit
650357ae
authored
Oct 30, 2018
by
k8s-ci-robot
Committed by
GitHub
Oct 30, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #70306 from obnoxxx/glusterfs-improve-comments
Glusterfs: improve some comments
parents
c7f06164
870bf314
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
glusterfs.go
pkg/volume/glusterfs/glusterfs.go
+4
-4
No files found.
pkg/volume/glusterfs/glusterfs.go
View file @
650357ae
...
...
@@ -822,10 +822,6 @@ func (p *glusterfsVolumeProvisioner) CreateVolume(gid int) (r *v1.GlusterfsVolum
return
nil
,
0
,
""
,
fmt
.
Errorf
(
"failed to get cluster nodes for volume %s: %v"
,
volume
,
err
)
}
// The 'endpointname' is created in form of 'glusterfs-dynamic-<PVC UID>'.
// createEndpointService() checks for this 'endpoint' existence in PVC's namespace and
// if not found, it create an endpoint and service using the IPs we dynamically picked at time
// of volume creation.
epServiceName
:=
dynamicEpSvcPrefix
+
string
(
p
.
options
.
PVC
.
UID
)
epNamespace
:=
p
.
options
.
PVC
.
Namespace
endpoint
,
service
,
err
:=
p
.
createEndpointService
(
epNamespace
,
epServiceName
,
dynamicHostIps
,
p
.
options
.
PVC
.
Name
)
...
...
@@ -845,6 +841,10 @@ func (p *glusterfsVolumeProvisioner) CreateVolume(gid int) (r *v1.GlusterfsVolum
},
sz
,
volID
,
nil
}
// createEndpointService() makes sure an endpoint and service
// exist for the given namespace, PVC name, endpoint name, and
// set of IPs. I.e. the endpoint or service is only created
// if it does not exist yet.
func
(
p
*
glusterfsVolumeProvisioner
)
createEndpointService
(
namespace
string
,
epServiceName
string
,
hostips
[]
string
,
pvcname
string
)
(
endpoint
*
v1
.
Endpoints
,
service
*
v1
.
Service
,
err
error
)
{
addrlist
:=
make
([]
v1
.
EndpointAddress
,
len
(
hostips
))
...
...
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