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
b8f70a84
Commit
b8f70a84
authored
May 29, 2018
by
Guoliang Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup some dead cloudprovider code
parent
07e6410c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
42 deletions
+0
-42
aws.go
pkg/cloudprovider/providers/aws/aws.go
+0
-21
gce_loadbalancer.go
pkg/cloudprovider/providers/gce/gce_loadbalancer.go
+0
-4
gce_util.go
pkg/cloudprovider/providers/gce/gce_util.go
+0
-5
vsphere_util.go
pkg/cloudprovider/providers/vsphere/vsphere_util.go
+0
-12
No files found.
pkg/cloudprovider/providers/aws/aws.go
View file @
b8f70a84
...
...
@@ -999,10 +999,6 @@ func updateConfigZone(cfg *CloudConfig, metadata EC2Metadata) error {
return
nil
}
func
getInstanceType
(
metadata
EC2Metadata
)
(
string
,
error
)
{
return
metadata
.
GetMetadata
(
"instance-type"
)
}
func
getAvailabilityZone
(
metadata
EC2Metadata
)
(
string
,
error
)
{
return
metadata
.
GetMetadata
(
"placement/availability-zone"
)
}
...
...
@@ -1920,23 +1916,6 @@ func (c *Cloud) buildSelfAWSInstance() (*awsInstance, error) {
return
newAWSInstance
(
c
.
ec2
,
instance
),
nil
}
// Gets the awsInstance with for the node with the specified nodeName, or the 'self' instance if nodeName == ""
func
(
c
*
Cloud
)
getAwsInstance
(
nodeName
types
.
NodeName
)
(
*
awsInstance
,
error
)
{
var
awsInstance
*
awsInstance
if
nodeName
==
""
{
awsInstance
=
c
.
selfAWSInstance
}
else
{
instance
,
err
:=
c
.
getInstanceByNodeName
(
nodeName
)
if
err
!=
nil
{
return
nil
,
err
}
awsInstance
=
newAWSInstance
(
c
.
ec2
,
instance
)
}
return
awsInstance
,
nil
}
// wrapAttachError wraps the error returned by an AttachVolume request with
// additional information, if needed and possible.
func
wrapAttachError
(
err
error
,
disk
*
awsDisk
,
instance
string
)
error
{
...
...
pkg/cloudprovider/providers/gce/gce_loadbalancer.go
View file @
b8f70a84
...
...
@@ -41,10 +41,6 @@ var (
lbSrcRngsFlag
cidrs
)
func
newLoadBalancerMetricContext
(
request
,
region
string
)
*
metricContext
{
return
newGenericMetricContext
(
"loadbalancer"
,
request
,
region
,
unusedMetricLabel
,
computeV1Version
)
}
func
init
()
{
var
err
error
// LB L7 proxies and all L3/4/7 health checkers have client addresses within these known CIDRs.
...
...
pkg/cloudprovider/providers/gce/gce_util.go
View file @
b8f70a84
...
...
@@ -138,11 +138,6 @@ func mapNodeNameToInstanceName(nodeName types.NodeName) string {
return
string
(
nodeName
)
}
// mapInstanceToNodeName maps a GCE Instance to a k8s NodeName
func
mapInstanceToNodeName
(
instance
*
compute
.
Instance
)
types
.
NodeName
{
return
types
.
NodeName
(
instance
.
Name
)
}
// GetGCERegion returns region of the gce zone. Zone names
// are of the form: ${region-name}-${ix}.
// For example, "us-central1-b" has a region of "us-central1".
...
...
pkg/cloudprovider/providers/vsphere/vsphere_util.go
View file @
b8f70a84
...
...
@@ -81,18 +81,6 @@ func getVSphereConfig() (*VSphereConfig, error) {
return
&
cfg
,
nil
}
func
getVSphereConn
(
cfg
*
VSphereConfig
)
*
vclib
.
VSphereConnection
{
vSphereConn
:=
&
vclib
.
VSphereConnection
{
Username
:
cfg
.
Global
.
User
,
Password
:
cfg
.
Global
.
Password
,
Hostname
:
cfg
.
Global
.
VCenterIP
,
Insecure
:
cfg
.
Global
.
InsecureFlag
,
RoundTripperCount
:
cfg
.
Global
.
RoundTripperCount
,
Port
:
cfg
.
Global
.
VCenterPort
,
}
return
vSphereConn
}
// Returns the accessible datastores for the given node VM.
func
getAccessibleDatastores
(
ctx
context
.
Context
,
nodeVmDetail
*
NodeDetails
,
nodeManager
*
NodeManager
)
([]
*
vclib
.
DatastoreInfo
,
error
)
{
accessibleDatastores
,
err
:=
nodeVmDetail
.
vm
.
GetAllAccessibleDatastores
(
ctx
)
...
...
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