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
7cc4f7a4
Commit
7cc4f7a4
authored
Jul 23, 2019
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wechat
parent
76f6b83e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
service.js
kubeService/service.js
+13
-8
redis.yaml
yamls/redis.yaml
+2
-0
No files found.
kubeService/service.js
View file @
7cc4f7a4
...
@@ -51,6 +51,9 @@ const serviceCreate = async (data) => {
...
@@ -51,6 +51,9 @@ const serviceCreate = async (data) => {
switch
(
jsonObj
.
kind
)
{
switch
(
jsonObj
.
kind
)
{
case
'
Service
'
:
case
'
Service
'
:
if
(
data
.
wechat
===
'
"1"
'
)
{
jsonObj
.
spec
.
type
=
'
NodePort
'
}
logger
.
info
(
'
创建svc
'
,
JSON
.
stringify
(
jsonObj
))
logger
.
info
(
'
创建svc
'
,
JSON
.
stringify
(
jsonObj
))
await
client
.
api
.
v1
.
namespaces
(
namespace
).
services
.
post
({
body
:
jsonObj
})
await
client
.
api
.
v1
.
namespaces
(
namespace
).
services
.
post
({
body
:
jsonObj
})
break
;
break
;
...
@@ -122,14 +125,16 @@ const getPodStatus = (podInfo) => {
...
@@ -122,14 +125,16 @@ const getPodStatus = (podInfo) => {
if
(
podInfo
.
status
.
phase
===
'
Pending
'
)
{
if
(
podInfo
.
status
.
phase
===
'
Pending
'
)
{
return
'
Pending
'
return
'
Pending
'
}
}
if
(
podInfo
.
status
.
conditions
[
2
].
status
===
'
False
'
)
{
if
(
podInfo
.
status
.
conditions
)
{
return
'
PodScheduling
'
if
(
podInfo
.
status
.
conditions
[
2
].
status
===
'
False
'
)
{
}
return
'
PodScheduling
'
if
(
podInfo
.
status
.
conditions
[
0
].
status
===
'
False
'
)
{
}
return
'
Initializing
'
if
(
podInfo
.
status
.
conditions
[
0
].
status
===
'
False
'
)
{
}
return
'
Initializing
'
if
(
podInfo
.
status
.
conditions
[
1
].
status
===
'
False
'
)
{
}
return
'
Waiting
'
if
(
podInfo
.
status
.
conditions
[
1
].
status
===
'
False
'
)
{
return
'
Waiting
'
}
}
}
if
(
podInfo
.
metadata
.
deletionTimestamp
)
{
if
(
podInfo
.
metadata
.
deletionTimestamp
)
{
return
'
Terminating
'
return
'
Terminating
'
...
...
yamls/redis.yaml
View file @
7cc4f7a4
...
@@ -62,5 +62,7 @@ spec:
...
@@ -62,5 +62,7 @@ spec:
port
:
6382
port
:
6382
-
name
:
'
6383'
-
name
:
'
6383'
port
:
6383
port
:
6383
-
name
:
'
26379'
port
:
26379
selector
:
selector
:
qcloud-app
:
{{
serviceName
}}
qcloud-app
:
{{
serviceName
}}
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