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
c4a8ea2e
Commit
c4a8ea2e
authored
Apr 13, 2017
by
Bowei Du
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Missing --project in the cluster up scripts for gce
```release-note NONE ```
parent
d2733394
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
util.sh
cluster/gce/util.sh
+10
-3
No files found.
cluster/gce/util.sh
View file @
c4a8ea2e
...
@@ -736,7 +736,9 @@ function create-subnetwork() {
...
@@ -736,7 +736,9 @@ function create-subnetwork() {
# Look for the subnet, it must exist and have a secondary range
# Look for the subnet, it must exist and have a secondary range
# configured.
# configured.
local
subnet
=
$(
gcloud alpha compute networks subnets describe
\
local
subnet
=
$(
gcloud alpha compute networks subnets describe
\
--region
${
REGION
}
${
IP_ALIAS_SUBNETWORK
}
2>/dev/null
)
--project
"
${
PROJECT
}
"
\
--region
${
REGION
}
\
${
IP_ALIAS_SUBNETWORK
}
2>/dev/null
)
if
[[
-z
${
subnet
}
]]
;
then
if
[[
-z
${
subnet
}
]]
;
then
# Only allow auto-creation for default subnets
# Only allow auto-creation for default subnets
if
[[
${
IP_ALIAS_SUBNETWORK
}
!=
${
INSTANCE_PREFIX
}
-subnet-default
]]
;
then
if
[[
${
IP_ALIAS_SUBNETWORK
}
!=
${
INSTANCE_PREFIX
}
-subnet-default
]]
;
then
...
@@ -753,6 +755,7 @@ function create-subnetwork() {
...
@@ -753,6 +755,7 @@ function create-subnetwork() {
gcloud alpha compute networks subnets create
\
gcloud alpha compute networks subnets create
\
${
IP_ALIAS_SUBNETWORK
}
\
${
IP_ALIAS_SUBNETWORK
}
\
--description
"Automatically generated subnet for
${
INSTANCE_PREFIX
}
cluster. This will be removed on cluster teardown."
\
--description
"Automatically generated subnet for
${
INSTANCE_PREFIX
}
cluster. This will be removed on cluster teardown."
\
--project
"
${
PROJECT
}
"
\
--network
${
NETWORK
}
\
--network
${
NETWORK
}
\
--region
${
REGION
}
\
--region
${
REGION
}
\
--range
${
NODE_IP_RANGE
}
\
--range
${
NODE_IP_RANGE
}
\
...
@@ -800,9 +803,13 @@ function delete-subnetwork() {
...
@@ -800,9 +803,13 @@ function delete-subnetwork() {
echo
"Removing auto-created subnet
${
NETWORK
}
:
${
IP_ALIAS_SUBNETWORK
}
"
echo
"Removing auto-created subnet
${
NETWORK
}
:
${
IP_ALIAS_SUBNETWORK
}
"
if
[[
-n
$(
gcloud alpha compute networks subnets describe
\
if
[[
-n
$(
gcloud alpha compute networks subnets describe
\
--region
${
REGION
}
${
IP_ALIAS_SUBNETWORK
}
2>/dev/null
)
]]
;
then
--project
"
${
PROJECT
}
"
\
--region
${
REGION
}
\
${
IP_ALIAS_SUBNETWORK
}
2>/dev/null
)
]]
;
then
gcloud alpha
--quiet
compute networks subnets delete
\
gcloud alpha
--quiet
compute networks subnets delete
\
--region
${
REGION
}
${
IP_ALIAS_SUBNETWORK
}
--project
"
${
PROJECT
}
"
\
--region
${
REGION
}
\
${
IP_ALIAS_SUBNETWORK
}
fi
fi
}
}
...
...
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