Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
D
deployment-scripts
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
Yuji Itadori
deployment-scripts
Commits
17954ee0
Commit
17954ee0
authored
Mar 11, 2019
by
Yuji Itadori
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update service-deregistration.sh
parent
f06d29fd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
service-deregistration.sh
service-deregistration.sh
+8
-2
No files found.
service-deregistration.sh
View file @
17954ee0
#!/bin/bash
for
i
in
1 2 3 4 5
CATALOG_ENDPOINT
=
"http://consul.vnetcloud.com/v1/catalog/service/
$1
"
CONSUL_COMMAND
=
""
curl
$CATALOG_ENDPOINT
| jq
-r
'.[].ServiceID'
>
service.lists
cat
service.lists |
while
read
line
do
kubectl
exec
-it
hedgehog-consul-server-0
-n
jx
--
/bin/sh
-c
"consul services deregister -id=go.micro.srv.news"
CONSUL_COMMAND
=
"
$CONSUL_COMMAND
consul services deregister -id=
$line
;"
echo
$CONSUL_COMMAND
>
consul.sh
done
kubectl
exec
-it
hedgehog-consul-server-0
-n
jx
--
/bin/sh
-c
"
$(
cat
consul.sh
)
"
\ No newline at end of file
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