Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
commander-deploy
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpd
commander-deploy
Commits
151c5a8b
Commit
151c5a8b
authored
Oct 14, 2025
by
李辉02
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(改成StatefulSet部署,解决存储问题): 修改ifs
parent
e477e404
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
22 deletions
+43
-22
statefulset.yaml
charts/commander-ifs-service/templates/statefulset.yaml
+29
-14
values.yaml
charts/commander-ifs-service/values.yaml
+14
-8
No files found.
charts/commander-ifs-service/templates/
deploymen
t.yaml
→
charts/commander-ifs-service/templates/
statefulse
t.yaml
View file @
151c5a8b
{{
- $storage
:
= (index .Values.global .Chart.Name "storage")
}}
{{
- $storage
:
= (index .Values.global .Chart.Name "storage")
}}
apiVersion
:
apps/v1
apiVersion
:
apps/v1
kind
:
Deploymen
t
kind
:
StatefulSe
t
metadata
:
metadata
:
name
:
{{
.Chart.Name
}}
name
:
{{
.Chart.Name
}}
namespace
:
{{
.Values.global.app.namespace
}}
namespace
:
{{
.Values.global.app.namespace
}}
labels
:
labels
:
app
:
{{
.Chart.Name
}}
app
:
{{
.Chart.Name
}}
spec
:
spec
:
serviceName
:
{{
.Chart.Name
}}
replicas
:
{{
.Values.global.app.replicas
}}
replicas
:
{{
.Values.global.app.replicas
}}
s
trategy
:
updateS
trategy
:
type
:
R
ecre
ate
type
:
R
ollingUpd
ate
selector
:
selector
:
matchLabels
:
matchLabels
:
app
:
{{
.Chart.Name
}}
app
:
{{
.Chart.Name
}}
...
@@ -19,6 +20,20 @@ spec:
...
@@ -19,6 +20,20 @@ spec:
app
:
{{
.Chart.Name
}}
app
:
{{
.Chart.Name
}}
spec
:
spec
:
{{
- include "app.imagePullSecrets" . | nindent 6
}}
{{
- include "app.imagePullSecrets" . | nindent 6
}}
initContainers
:
-
name
:
init-dirs
image
:
"
{{
.Values.global.busybox.image.repository
}}:{{
.Values.global.busybox.image.tag
}}"
command
:
-
sh
-
-c
-
|
{{- range $storage.initDirs }}
mkdir -p {{ $storage.mountPath }}/{{ . }}
{{- end }}
chmod -R 777 {{ $storage.mountPath }}
volumeMounts
:
-
name
:
app-files
mountPath
:
{{
$storage.mountPath
}}
containers
:
containers
:
-
image
:
{{
.Values.global.app.imageUrl
}}{{
.Chart.Name
}}
:{{ index .Values.global .Chart.Name "imageVersion" }}
-
image
:
{{
.Values.global.app.imageUrl
}}{{
.Chart.Name
}}
:{{ index .Values.global .Chart.Name "imageVersion" }}
name
:
{{
.Chart.Name
}}
name
:
{{
.Chart.Name
}}
...
@@ -32,14 +47,14 @@ spec:
...
@@ -32,14 +47,14 @@ spec:
resources
:
resources
:
{{
- include "app.resources" . | nindent 12
}}
{{
- include "app.resources" . | nindent 12
}}
volumeMounts
:
volumeMounts
:
{{
- range $storage.volumes
}}
-
name
:
app-files
-
name
:
{{
.name
}}
mountPath
:
"
/app/files"
mountPath
:
{{
.mountPath
}}
volumeClaimTemplates
:
{{
- end
}}
-
metadata
:
volumes
:
name
:
app-files
{{
- range $storage.volumes
}}
spec
:
-
name
:
{{
.name
}}
accessModes
:
[
"
ReadWriteOnce"
]
hostPath
:
storageClassName
:
{{
.Values.global.storageClass.storageClassName | quote
}}
path
:
{{
.hostPath
}}
resources
:
type
:
DirectoryOrCreate
requests
:
{{
- end
}}
storage
:
{{
.Values.global.storageClass.size | quote
}}
charts/commander-ifs-service/values.yaml
View file @
151c5a8b
...
@@ -13,7 +13,14 @@ global:
...
@@ -13,7 +13,14 @@ global:
namespace
:
commander-standard-dev
namespace
:
commander-standard-dev
replicas
:
1
replicas
:
1
imageUrl
:
k8s-t0.tencentcloudcr.com/commander/
imageUrl
:
k8s-t0.tencentcloudcr.com/commander/
busybox
:
image
:
repository
:
"
k8s-t0.tencentcloudcr.com/k8s/busybox"
tag
:
latest
profiles_active
:
"
prod"
profiles_active
:
"
prod"
storageClass
:
storageClassName
:
"
cbs"
size
:
"
10Gi"
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
commander-ifs-service
:
commander-ifs-service
:
imageVersion
:
"
2.1.2"
imageVersion
:
"
2.1.2"
...
@@ -26,12 +33,10 @@ global:
...
@@ -26,12 +33,10 @@ global:
charset
:
"
utf8"
charset
:
"
utf8"
sslmode
:
"
none"
sslmode
:
"
none"
allowUserVariables
:
"
true"
allowUserVariables
:
"
true"
# 存储配置
- 直接挂载宿主机目录
# 存储配置
storage
:
storage
:
volumes
:
mountPath
:
"
/app/files"
-
name
:
rev-video
# 需要初始化创建的子目录列表
mountPath
:
"
/app/files/RevVideo"
initDirs
:
hostPath
:
"
/data/commander-ifs/RevVideo"
-
RevVideo
-
name
:
rev-images
-
RevImages
mountPath
:
"
/app/files/RevImages"
\ No newline at end of file
hostPath
:
"
/data/commander-ifs/RevImages"
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