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
3dd3d6e8
Commit
3dd3d6e8
authored
Jul 08, 2015
by
Victor Marmol
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10751 from justinsb/aws_existing_subnet
AWS: Allow callers to specify VPC_ID and SUBNET_ID
parents
c2683525
2429c7ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
util.sh
cluster/aws/util.sh
+6
-3
No files found.
cluster/aws/util.sh
View file @
3dd3d6e8
...
@@ -678,8 +678,9 @@ function kube-up {
...
@@ -678,8 +678,9 @@ function kube-up {
import-public-key
${
AWS_SSH_KEY_NAME
}
${
AWS_SSH_KEY
}
.pub
import-public-key
${
AWS_SSH_KEY_NAME
}
${
AWS_SSH_KEY
}
.pub
VPC_ID
=
$(
get_vpc_id
)
if
[[
-z
"
${
VPC_ID
:-}
"
]]
;
then
VPC_ID
=
$(
get_vpc_id
)
fi
if
[[
-z
"
$VPC_ID
"
]]
;
then
if
[[
-z
"
$VPC_ID
"
]]
;
then
echo
"Creating vpc."
echo
"Creating vpc."
VPC_ID
=
$(
$AWS_CMD
create-vpc
--cidr-block
$INTERNAL_IP_BASE
.0/16 | json_val
'["Vpc"]["VpcId"]'
)
VPC_ID
=
$(
$AWS_CMD
create-vpc
--cidr-block
$INTERNAL_IP_BASE
.0/16 | json_val
'["Vpc"]["VpcId"]'
)
...
@@ -691,7 +692,9 @@ function kube-up {
...
@@ -691,7 +692,9 @@ function kube-up {
echo
"Using VPC
$VPC_ID
"
echo
"Using VPC
$VPC_ID
"
SUBNET_ID
=
$(
$AWS_CMD
describe-subnets
--filters
Name
=
tag:KubernetesCluster,Values
=
${
CLUSTER_ID
}
| get_subnet_id
$VPC_ID
$ZONE
)
if
[[
-z
"
${
SUBNET_ID
:-}
"
]]
;
then
SUBNET_ID
=
$(
$AWS_CMD
describe-subnets
--filters
Name
=
tag:KubernetesCluster,Values
=
${
CLUSTER_ID
}
| get_subnet_id
$VPC_ID
$ZONE
)
fi
if
[[
-z
"
$SUBNET_ID
"
]]
;
then
if
[[
-z
"
$SUBNET_ID
"
]]
;
then
echo
"Creating subnet."
echo
"Creating subnet."
SUBNET_ID
=
$(
$AWS_CMD
create-subnet
--cidr-block
$INTERNAL_IP_BASE
.0/24
--vpc-id
$VPC_ID
--availability-zone
${
ZONE
}
| json_val
'["Subnet"]["SubnetId"]'
)
SUBNET_ID
=
$(
$AWS_CMD
create-subnet
--cidr-block
$INTERNAL_IP_BASE
.0/24
--vpc-id
$VPC_ID
--availability-zone
${
ZONE
}
| json_val
'["Subnet"]["SubnetId"]'
)
...
...
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