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
511e3e1b
Commit
511e3e1b
authored
Sep 24, 2015
by
Christopher Eck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for issue #14466. Don't use tag filtering when looking up which VPC an AWS…
Fix for issue #14466. Don't use tag filtering when looking up which VPC an AWS node is attached to.
parent
0662141f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
aws.go
pkg/cloudprovider/providers/aws/aws.go
+7
-2
No files found.
pkg/cloudprovider/providers/aws/aws.go
View file @
511e3e1b
...
@@ -1276,7 +1276,7 @@ func (self *AWSCloud) findVPCID() (string, error) {
...
@@ -1276,7 +1276,7 @@ func (self *AWSCloud) findVPCID() (string, error) {
return
""
,
fmt
.
Errorf
(
"Could not find VPC id in instance metadata"
)
return
""
,
fmt
.
Errorf
(
"Could not find VPC id in instance metadata"
)
}
}
// Find the
kubernetes VPC
// Find the
VPC which self is attached to.
func
(
self
*
AWSCloud
)
findVPC
()
(
*
ec2
.
VPC
,
error
)
{
func
(
self
*
AWSCloud
)
findVPC
()
(
*
ec2
.
VPC
,
error
)
{
request
:=
&
ec2
.
DescribeVPCsInput
{}
request
:=
&
ec2
.
DescribeVPCsInput
{}
...
@@ -1286,7 +1286,9 @@ func (self *AWSCloud) findVPC() (*ec2.VPC, error) {
...
@@ -1286,7 +1286,9 @@ func (self *AWSCloud) findVPC() (*ec2.VPC, error) {
return
nil
,
err
return
nil
,
err
}
}
filters
:=
[]
*
ec2
.
Filter
{
newEc2Filter
(
"vpc-id"
,
vpcID
)}
filters
:=
[]
*
ec2
.
Filter
{
newEc2Filter
(
"vpc-id"
,
vpcID
)}
request
.
Filters
=
self
.
addFilters
(
filters
)
// Don't bother adding the filterTags as we know this VPC is valid for this instance from findVPCID above.
// This is important as sharing a single regional VPC with multiple per-AZ clusters is a common deployment.
request
.
Filters
=
filters
vpcs
,
err
:=
self
.
ec2
.
DescribeVPCs
(
request
)
vpcs
,
err
:=
self
.
ec2
.
DescribeVPCs
(
request
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -1628,6 +1630,9 @@ func (s *AWSCloud) EnsureTCPLoadBalancer(name, region string, publicIP net.IP, p
...
@@ -1628,6 +1630,9 @@ func (s *AWSCloud) EnsureTCPLoadBalancer(name, region string, publicIP net.IP, p
request
:=
&
ec2
.
DescribeSubnetsInput
{}
request
:=
&
ec2
.
DescribeSubnetsInput
{}
filters
:=
[]
*
ec2
.
Filter
{}
filters
:=
[]
*
ec2
.
Filter
{}
filters
=
append
(
filters
,
newEc2Filter
(
"vpc-id"
,
orEmpty
(
vpc
.
VPCID
)))
filters
=
append
(
filters
,
newEc2Filter
(
"vpc-id"
,
orEmpty
(
vpc
.
VPCID
)))
// Note, this will only return subnets tagged with the cluster identifier for this Kubernetes cluster.
// In the case where an AZ has public & private subnets per AWS best practices, the deployment should ensure
// only the public subnet (where the ELB will go) is so tagged.
filters
=
s
.
addFilters
(
filters
)
filters
=
s
.
addFilters
(
filters
)
request
.
Filters
=
filters
request
.
Filters
=
filters
...
...
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