Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qg-dockerfiles
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qg-dockerfiles
Commits
46d3ded8
Commit
46d3ded8
authored
Sep 10, 2019
by
kewei.jia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加健康检查
parent
da440bd2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
Dockerfile
tke/zookeeper3.4/Dockerfile
+2
-1
readyCheck.sh
tke/zookeeper3.4/readyCheck.sh
+27
-0
No files found.
tke/zookeeper3.4/Dockerfile
View file @
46d3ded8
FROM
zookeeper:3.4
FROM
zookeeper:3.4
.13
COPY
readyCheck.sh .
tke/zookeeper3.4/readyCheck.sh
0 → 100755
View file @
46d3ded8
#!/usr/bin/env bash
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# zkOk.sh uses the ruok ZooKeeper four letter work to determine if the instance
# is health. The $? variable will be set to 0 if server responds that it is
# healthy, or 1 if the server fails to respond.
ZK_CLIENT_PORT
=
${
ZK_CLIENT_PORT
:-
2181
}
OK
=
$(
echo
ruok | nc 127.0.0.1
$ZK_CLIENT_PORT
)
if
[
"
$OK
"
==
"imok"
]
;
then
exit
0
else
exit
1
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