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
e02483e3
Commit
e02483e3
authored
Jun 02, 2015
by
Jeff Lowdermilk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix route regexp for gce-kube-down
parent
00005f4d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
util.sh
cluster/gce/util.sh
+7
-3
No files found.
cluster/gce/util.sh
View file @
e02483e3
...
@@ -816,10 +816,14 @@ function kube-down {
...
@@ -816,10 +816,14 @@ function kube-down {
# Delete routes.
# Delete routes.
local
-a
routes
local
-a
routes
# Clean up all routes w/ names like "<cluster-name>-minion-<4-char-node-identifier>"
# Clean up all routes w/ names like "<cluster-name>-<node-GUID>"
# e.g. "kubernetes-minion-2pl1"
# e.g. "kubernetes-12345678-90ab-cdef-1234-567890abcdef". The name is
# determined by the node controller on the master.
# Note that this is currently a noop, as synchronously deleting the node MIG
# first allows the master to cleanup routes itself.
local
TRUNCATED_PREFIX
=
"
${
INSTANCE_PREFIX
:0:26
}
"
routes
=(
$(
gcloud compute routes list
--project
"
${
PROJECT
}
"
\
routes
=(
$(
gcloud compute routes list
--project
"
${
PROJECT
}
"
\
--regexp
"
${
INSTANCE_PREFIX
}
-minion-.{4
}"
|
awk
'NR >= 2 { print $1 }'
)
)
--regexp
"
${
TRUNCATED_PREFIX
}
-.{8}-.{4}-.{4}-.{4}-.{12
}"
|
awk
'NR >= 2 { print $1 }'
)
)
while
((
"
${#
routes
[@]
}
"
>
0
))
;
do
while
((
"
${#
routes
[@]
}
"
>
0
))
;
do
echo
Deleting routes
"
${
routes
[*]
::10
}
"
echo
Deleting routes
"
${
routes
[*]
::10
}
"
gcloud compute routes delete
\
gcloud compute routes delete
\
...
...
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