Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Rainbond2
Commits
3672a4a8
Commit
3672a4a8
authored
6 years ago
by
GLYASAI
Browse files
Options
Download
Email Patches
Plain Diff
[ADD] add some logs
parent
f3f2421f
main
Develop-V5.X
V5.0
V5.1
V5.2
V5.3
V5.4
dependabot/npm_and_yarn/webcli/js/xterm-4.5.0
feat-V5.10
feat-V5.10.1
feat-containerd
feat-containerd1
feature-helmapp
feature-helmapp-2
feature-k8s
fixbug-560
gitee
master
mesh-start
servicemonitor
zqhtest-containerd
v5.10.0-release
v5.9.0-release
v5.8.1-release
v5.8.0-release
v5.7.1-release
v5.7.0-release
v5.6.0-release
v5.5.0-release
v5.5.0-dind
v5.4.1-release
v5.4.0-release
v5.3.3-release
v5.3.2-release
v5.3.1-release
v5.3.0-release
v5.2.2-release
v5.2.1-release
v5.2.0-release
v5.2.0-beta2
v5.2.0-beta1
v5.1.11-release
v5.1.10-release
v5.1.9-release
v5.1.8-release
v5.1.6-release
v5.1.5-release
v5.1.4-release
v5.1.3-release
v5.1.2-release
v5.1.1-release
v5.1.0-release
v5.0.4-release
v5.0.3-release
v5.0.1-release
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
worker/appm/conversion/version.go
+5
-0
worker/appm/conversion/version.go
with
5 additions
and
0 deletions
+5
-0
worker/appm/conversion/version.go
+
5
-
0
View file @
3672a4a8
...
...
@@ -316,6 +316,7 @@ var memoryLabels = map[int]string{
}
func
createVolumes
(
as
*
v1
.
AppService
,
version
*
dbmodel
.
VersionInfo
,
dbmanager
db
.
Manager
)
(
*
volumeDefine
,
error
)
{
logrus
.
Infof
(
"begin creating volumes."
)
var
vd
=
&
volumeDefine
{
as
:
as
,
}
...
...
@@ -344,6 +345,7 @@ func createVolumes(as *v1.AppService, version *dbmodel.VersionInfo, dbmanager db
logrus
.
Errorf
(
"there is no config files according to volume name(%s)"
,
v
.
VolumeName
)
return
nil
,
fmt
.
Errorf
(
"there is no config files according to volume name(%s)"
,
v
.
VolumeName
)
}
logrus
.
Debugf
(
"config files is %v"
,
cfs
)
configMap
:=
&
corev1
.
ConfigMap
{
ObjectMeta
:
metav1
.
ObjectMeta
{
Name
:
fmt
.
Sprintf
(
"manual%d"
,
v
.
ID
),
...
...
@@ -368,6 +370,7 @@ func createVolumes(as *v1.AppService, version *dbmodel.VersionInfo, dbmanager db
}
}
//handle Shared storage
logrus
.
Infof
(
"begin handling Shared storage"
)
tsmr
,
err
:=
dbmanager
.
TenantServiceMountRelationDao
()
.
GetTenantServiceMountRelationsByService
(
version
.
ServiceID
)
if
err
!=
nil
{
return
nil
,
err
...
...
@@ -434,6 +437,7 @@ func (v *volumeDefine) GetVolumeMounts() []corev1.VolumeMount {
return
v
.
volumeMounts
}
func
(
v
*
volumeDefine
)
SetPV
(
VolumeType
dbmodel
.
VolumeType
,
name
,
mountPath
string
,
readOnly
bool
)
{
logrus
.
Info
(
"Set persistence volume for statefuleset."
)
switch
VolumeType
{
case
dbmodel
.
ShareFileVolumeType
:
logrus
.
Infof
(
"VolumeType is share-file"
)
...
...
@@ -529,6 +533,7 @@ func (v *volumeDefine) SetPV(VolumeType dbmodel.VolumeType, name, mountPath stri
}
}
func
(
v
*
volumeDefine
)
SetVolume
(
VolumeType
dbmodel
.
VolumeType
,
name
,
mountPath
,
hostPath
string
,
hostPathType
corev1
.
HostPathType
,
readOnly
bool
)
{
logrus
.
Info
(
"Set volume for deployment."
)
for
_
,
m
:=
range
v
.
volumeMounts
{
if
m
.
MountPath
==
mountPath
{
return
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help