Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tke-eos
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
tke-eos
Commits
85cf0373
Commit
85cf0373
authored
Aug 26, 2019
by
智勇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'checkHealth' into 'master'
添加 redis和mysql的健康检查 See merge request !40
parents
54c1803f
ad4f6d18
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
2 deletions
+65
-2
mongo.op.yaml
yamls/mongo.op.yaml
+8
-1
mongo.pvc.yaml
yamls/mongo.pvc.yaml
+7
-0
mongo.sts.yaml
yamls/mongo.sts.yaml
+8
-1
mysql.pvc.yaml
yamls/mysql.pvc.yaml
+7
-0
redis.yaml
yamls/redis.yaml
+35
-0
No files found.
yamls/mongo.op.yaml
View file @
85cf0373
...
@@ -51,6 +51,13 @@ spec:
...
@@ -51,6 +51,13 @@ spec:
value
:
qa
value
:
qa
-
name
:
MONGO_INITDB_ROOT_PASSWORD
-
name
:
MONGO_INITDB_ROOT_PASSWORD
value
:
qatest
value
:
qatest
readinessProbe
:
exec
:
command
:
[
"
mongo"
,
"
-uqa"
,
"
-pqatest"
,
"
admin"
]
initialDelaySeconds
:
5
periodSeconds
:
2
timeoutSeconds
:
1
failureThreshold
:
40
volumeMounts
:
volumeMounts
:
-
mountPath
:
"
/data/db"
-
mountPath
:
"
/data/db"
name
:
db
name
:
db
...
@@ -84,4 +91,4 @@ spec:
...
@@ -84,4 +91,4 @@ spec:
targetPort
:
27017
targetPort
:
27017
selector
:
selector
:
qcloud-app
:
mongodb
qcloud-app
:
mongodb
yamls/mongo.pvc.yaml
View file @
85cf0373
...
@@ -53,6 +53,13 @@ spec:
...
@@ -53,6 +53,13 @@ spec:
value
:
qa
value
:
qa
-
name
:
MONGO_INITDB_ROOT_PASSWORD
-
name
:
MONGO_INITDB_ROOT_PASSWORD
value
:
qatest
value
:
qatest
readinessProbe
:
exec
:
command
:
[
"
mongo"
,
"
-uqa"
,
"
-pqatest"
,
"
admin"
]
initialDelaySeconds
:
5
periodSeconds
:
2
timeoutSeconds
:
1
failureThreshold
:
40
volumeMounts
:
volumeMounts
:
-
mountPath
:
"
/var/lib/mongo"
-
mountPath
:
"
/var/lib/mongo"
name
:
{{
serviceName
}}
name
:
{{
serviceName
}}
...
...
yamls/mongo.sts.yaml
View file @
85cf0373
...
@@ -10,7 +10,7 @@ spec:
...
@@ -10,7 +10,7 @@ spec:
type
:
NodePort
type
:
NodePort
ports
:
ports
:
-
port
:
27017
-
port
:
27017
targetPort
:
27017
targetPort
:
27017
selector
:
selector
:
qcloud-app
:
mongodb
qcloud-app
:
mongodb
...
@@ -45,6 +45,13 @@ spec:
...
@@ -45,6 +45,13 @@ spec:
value
:
qa
value
:
qa
-
name
:
MONGO_INITDB_ROOT_PASSWORD
-
name
:
MONGO_INITDB_ROOT_PASSWORD
value
:
qatest
value
:
qatest
readinessProbe
:
exec
:
command
:
[
"
mongo"
,
"
-uqa"
,
"
-pqatest"
,
"
admin"
]
initialDelaySeconds
:
5
periodSeconds
:
2
timeoutSeconds
:
1
failureThreshold
:
40
volumeMounts
:
volumeMounts
:
-
name
:
mongodb-ps
-
name
:
mongodb-ps
mountPath
:
/data/db
mountPath
:
/data/db
...
...
yamls/mysql.pvc.yaml
View file @
85cf0373
...
@@ -72,6 +72,13 @@ spec:
...
@@ -72,6 +72,13 @@ spec:
value
:
Quantgroup2017
value
:
Quantgroup2017
-
name
:
MYSQL_USER
-
name
:
MYSQL_USER
value
:
qa
value
:
qa
readinessProbe
:
exec
:
command
:
[
"
mysql"
,
"
-uqa"
,
"
-pqatest"
,
"
-e"
,
"
SELECT
1"
]
initialDelaySeconds
:
5
periodSeconds
:
2
timeoutSeconds
:
1
failureThreshold
:
40
volumeMounts
:
volumeMounts
:
-
mountPath
:
"
/var/lib/mysql"
-
mountPath
:
"
/var/lib/mysql"
name
:
{{
serviceName
}}
name
:
{{
serviceName
}}
...
...
yamls/redis.yaml
View file @
85cf0373
...
@@ -34,6 +34,13 @@ spec:
...
@@ -34,6 +34,13 @@ spec:
limits
:
limits
:
cpu
:
{{
resources.cpu.limit
}}
m
cpu
:
{{
resources.cpu.limit
}}
m
memory
:
{{
resources.memory.limit
}}
Mi
memory
:
{{
resources.memory.limit
}}
Mi
readinessProbe
:
exec
:
command
:
[
"
redis-cli"
,
"
-p"
,
"
6379"
,
"
info"
]
initialDelaySeconds
:
5
periodSeconds
:
2
timeoutSeconds
:
1
failureThreshold
:
40
-
image
:
ccr.ccs.tencentyun.com/{{image}}
-
image
:
ccr.ccs.tencentyun.com/{{image}}
imagePullPolicy
:
Always
imagePullPolicy
:
Always
name
:
{{
serviceName
}}
-6380
name
:
{{
serviceName
}}
-6380
...
@@ -45,6 +52,13 @@ spec:
...
@@ -45,6 +52,13 @@ spec:
limits
:
limits
:
cpu
:
{{
resources.cpu.limit
}}
m
cpu
:
{{
resources.cpu.limit
}}
m
memory
:
200Mi
memory
:
200Mi
readinessProbe
:
exec
:
command
:
[
"
redis-cli"
,
"
-p"
,
"
6380"
,
"
info"
]
initialDelaySeconds
:
5
periodSeconds
:
2
timeoutSeconds
:
1
failureThreshold
:
40
-
image
:
ccr.ccs.tencentyun.com/{{image}}
-
image
:
ccr.ccs.tencentyun.com/{{image}}
imagePullPolicy
:
Always
imagePullPolicy
:
Always
name
:
{{
serviceName
}}
-6381
name
:
{{
serviceName
}}
-6381
...
@@ -56,6 +70,13 @@ spec:
...
@@ -56,6 +70,13 @@ spec:
limits
:
limits
:
cpu
:
{{
resources.cpu.limit
}}
m
cpu
:
{{
resources.cpu.limit
}}
m
memory
:
{{
resources.memory.limit
}}
Mi
memory
:
{{
resources.memory.limit
}}
Mi
readinessProbe
:
exec
:
command
:
[
"
redis-cli"
,
"
-p"
,
"
6381"
,
"
info"
]
initialDelaySeconds
:
5
periodSeconds
:
2
timeoutSeconds
:
1
failureThreshold
:
40
-
image
:
ccr.ccs.tencentyun.com/{{image}}
-
image
:
ccr.ccs.tencentyun.com/{{image}}
imagePullPolicy
:
Always
imagePullPolicy
:
Always
name
:
{{
serviceName
}}
-6382
name
:
{{
serviceName
}}
-6382
...
@@ -67,6 +88,13 @@ spec:
...
@@ -67,6 +88,13 @@ spec:
limits
:
limits
:
cpu
:
{{
resources.cpu.limit
}}
m
cpu
:
{{
resources.cpu.limit
}}
m
memory
:
{{
resources.memory.limit
}}
Mi
memory
:
{{
resources.memory.limit
}}
Mi
readinessProbe
:
exec
:
command
:
[
"
redis-cli"
,
"
-p"
,
"
6382"
,
"
info"
]
initialDelaySeconds
:
5
periodSeconds
:
2
timeoutSeconds
:
1
failureThreshold
:
40
-
image
:
ccr.ccs.tencentyun.com/{{image}}
-
image
:
ccr.ccs.tencentyun.com/{{image}}
imagePullPolicy
:
Always
imagePullPolicy
:
Always
name
:
{{
serviceName
}}
-6383
name
:
{{
serviceName
}}
-6383
...
@@ -78,6 +106,13 @@ spec:
...
@@ -78,6 +106,13 @@ spec:
limits
:
limits
:
cpu
:
{{
resources.cpu.limit
}}
m
cpu
:
{{
resources.cpu.limit
}}
m
memory
:
{{
resources.memory.limit
}}
Mi
memory
:
{{
resources.memory.limit
}}
Mi
readinessProbe
:
exec
:
command
:
[
"
redis-cli"
,
"
-p"
,
"
6383"
,
"
info"
]
initialDelaySeconds
:
5
periodSeconds
:
2
timeoutSeconds
:
1
failureThreshold
:
40
dnsPolicy
:
ClusterFirst
dnsPolicy
:
ClusterFirst
imagePullSecrets
:
imagePullSecrets
:
-
name
:
qcloudregistrykey
-
name
:
qcloudregistrykey
...
...
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