Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
holmes
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
holmes
Commits
8f2e89a4
Commit
8f2e89a4
authored
Apr 20, 2022
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
e1b78faf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
165 additions
and
2 deletions
+165
-2
TkeService.java
src/main/java/cn/qg/holmes/service/k8s/TkeService.java
+1
-1
Rabbitmq-Deployment.yml
src/main/resources/tke/template/Rabbitmq-Deployment.yml
+1
-1
Redis5-Deployment.yml
src/main/resources/tke/template/Redis5-Deployment.yml
+140
-0
Redis5-Service.yml
src/main/resources/tke/template/Redis5-Service.yml
+23
-0
No files found.
src/main/java/cn/qg/holmes/service/k8s/TkeService.java
View file @
8f2e89a4
...
...
@@ -788,7 +788,7 @@ public class TkeService {
List
<
Service
>
serviceList
=
kubernetesClient
.
services
().
inNamespace
(
namespace
).
list
().
getItems
();
for
(
Service
service:
serviceList
)
{
String
serviceName
=
service
.
getMetadata
().
getName
();
if
(!
checkDeploymentExistence
(
namespace
,
serviceName
))
{
if
(!
serviceName
.
startsWith
(
"kafka"
)
&&
!
checkDeploymentExistence
(
namespace
,
serviceName
))
{
log
.
info
(
"{}环境{}Deployment不存在,删除Service"
,
namespace
,
serviceName
);
deleteService
(
namespace
,
serviceName
);
}
...
...
src/main/resources/tke/template/Rabbitmq-Deployment.yml
View file @
8f2e89a4
apiVersion
:
apps/v1
beta1
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
labels
:
...
...
src/main/resources/tke/template/Redis5-Deployment.yml
0 → 100644
View file @
8f2e89a4
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
labels
:
type
:
base
qcloud-app
:
redis5
name
:
redis5
namespace
:
{{
namespace
}}
spec
:
replicas
:
1
revisionHistoryLimit
:
1
selector
:
matchLabels
:
qcloud-app
:
redis5
strategy
:
type
:
Recreate
template
:
metadata
:
labels
:
type
:
base
qcloud-app
:
redis5
spec
:
containers
:
-
image
:
ccr.ccs.tencentyun.com/{{image}}
imagePullPolicy
:
IfNotPresent
name
:
redis-6379
command
:
[
"
redis-server"
,
"
--port"
,
"
6379"
]
resources
:
requests
:
cpu
:
100m
memory
:
400Mi
limits
:
cpu
:
1000m
memory
:
4000Mi
livenessProbe
:
exec
:
command
:
[
"
redis-cli"
,
"
-p"
,
"
6379"
,
"
info"
]
initialDelaySeconds
:
100
successThreshold
:
1
readinessProbe
:
exec
:
command
:
[
"
redis-cli"
,
"
-p"
,
"
6379"
,
"
info"
]
initialDelaySeconds
:
5
timeoutSeconds
:
1
periodSeconds
:
5
-
image
:
ccr.ccs.tencentyun.com/{{image}}
imagePullPolicy
:
IfNotPresent
name
:
redis-6380
command
:
[
"
redis-server"
,
"
--port"
,
"
6380"
]
resources
:
requests
:
cpu
:
100m
memory
:
200Mi
limits
:
cpu
:
512m
memory
:
1024Mi
livenessProbe
:
exec
:
command
:
[
"
redis-cli"
,
"
-p"
,
"
6380"
,
"
info"
]
initialDelaySeconds
:
100
successThreshold
:
1
readinessProbe
:
exec
:
command
:
[
"
redis-cli"
,
"
-p"
,
"
6380"
,
"
info"
]
initialDelaySeconds
:
5
timeoutSeconds
:
1
periodSeconds
:
5
-
image
:
ccr.ccs.tencentyun.com/{{image}}
imagePullPolicy
:
IfNotPresent
name
:
redis-6381
command
:
[
"
redis-server"
,
"
--port"
,
"
6381"
]
resources
:
requests
:
cpu
:
100m
memory
:
100Mi
limits
:
cpu
:
200m
memory
:
200Mi
livenessProbe
:
exec
:
command
:
[
"
redis-cli"
,
"
-p"
,
"
6381"
,
"
info"
]
initialDelaySeconds
:
100
successThreshold
:
1
readinessProbe
:
exec
:
command
:
[
"
redis-cli"
,
"
-p"
,
"
6381"
,
"
info"
]
initialDelaySeconds
:
5
timeoutSeconds
:
1
periodSeconds
:
5
-
image
:
ccr.ccs.tencentyun.com/{{image}}
imagePullPolicy
:
IfNotPresent
name
:
redis-6382
command
:
[
"
redis-server"
,
"
--port"
,
"
6382"
]
resources
:
requests
:
cpu
:
100m
memory
:
100Mi
limits
:
cpu
:
200m
memory
:
200Mi
livenessProbe
:
exec
:
command
:
[
"
redis-cli"
,
"
-p"
,
"
6382"
,
"
info"
]
initialDelaySeconds
:
100
successThreshold
:
1
readinessProbe
:
exec
:
command
:
[
"
redis-cli"
,
"
-p"
,
"
6382"
,
"
info"
]
initialDelaySeconds
:
5
timeoutSeconds
:
1
periodSeconds
:
5
-
image
:
ccr.ccs.tencentyun.com/{{image}}
imagePullPolicy
:
IfNotPresent
name
:
redis-6383
command
:
[
"
redis-server"
,
"
--port"
,
"
6383"
]
resources
:
requests
:
cpu
:
100m
memory
:
100Mi
limits
:
cpu
:
200m
memory
:
200Mi
livenessProbe
:
exec
:
command
:
[
"
redis-cli"
,
"
-p"
,
"
6383"
,
"
info"
]
initialDelaySeconds
:
100
successThreshold
:
1
readinessProbe
:
exec
:
command
:
[
"
redis-cli"
,
"
-p"
,
"
6383"
,
"
info"
]
initialDelaySeconds
:
5
timeoutSeconds
:
1
periodSeconds
:
5
dnsPolicy
:
ClusterFirst
imagePullSecrets
:
-
name
:
qcloudregistrykey
-
name
:
tencenthubkey
restartPolicy
:
Always
terminationGracePeriodSeconds
:
30
status
:
{}
\ No newline at end of file
src/main/resources/tke/template/Redis5-Service.yml
0 → 100644
View file @
8f2e89a4
apiVersion
:
v1
kind
:
Service
metadata
:
labels
:
type
:
base
qcloud-app
:
redis5
name
:
redis5
namespace
:
{{
namespace
}}
spec
:
type
:
NodePort
ports
:
-
name
:
'
6379'
port
:
6379
-
name
:
'
6380'
port
:
6380
-
name
:
'
6381'
port
:
6381
-
name
:
'
6382'
port
:
6382
-
name
:
'
6383'
port
:
6383
selector
:
qcloud-app
:
redis5
\ 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