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
c66a3bf4
Unverified
Commit
c66a3bf4
authored
3 years ago
by
dp
Committed by
GitHub
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
update plugin contianer command build way.
parent
5ba08821
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
worker/appm/conversion/plugin.go
+7
-8
worker/appm/conversion/plugin.go
with
7 additions
and
8 deletions
+7
-8
worker/appm/conversion/plugin.go
+
7
-
8
View file @
c66a3bf4
...
@@ -107,13 +107,7 @@ func conversionServicePlugin(as *typesv1.AppService, dbmanager db.Manager) ([]v1
...
@@ -107,13 +107,7 @@ func conversionServicePlugin(as *typesv1.AppService, dbmanager db.Manager) ([]v1
},
},
})
})
}
}
args
:=
make
([]
string
,
0
)
if
len
(
versionInfo
.
ContainerCMD
)
>
0
{
args
=
[]
string
{
"/bin/sh"
,
"-c"
,
versionInfo
.
ContainerCMD
}
}
if
err
!=
nil
{
return
nil
,
nil
,
nil
,
err
}
pc
:=
v1
.
Container
{
pc
:=
v1
.
Container
{
Name
:
"plugin-"
+
pluginR
.
PluginID
,
Name
:
"plugin-"
+
pluginR
.
PluginID
,
Image
:
versionInfo
.
BuildLocalImage
,
Image
:
versionInfo
.
BuildLocalImage
,
...
@@ -121,9 +115,14 @@ func conversionServicePlugin(as *typesv1.AppService, dbmanager db.Manager) ([]v1
...
@@ -121,9 +115,14 @@ func conversionServicePlugin(as *typesv1.AppService, dbmanager db.Manager) ([]v1
EnvFrom
:
envFromSecrets
,
EnvFrom
:
envFromSecrets
,
Resources
:
createPluginResources
(
pluginR
.
ContainerMemory
,
pluginR
.
ContainerCPU
),
Resources
:
createPluginResources
(
pluginR
.
ContainerMemory
,
pluginR
.
ContainerCPU
),
TerminationMessagePath
:
""
,
TerminationMessagePath
:
""
,
Args
:
args
,
VolumeMounts
:
mainContainer
.
VolumeMounts
,
VolumeMounts
:
mainContainer
.
VolumeMounts
,
}
}
if
len
(
versionInfo
.
ContainerCMD
)
>
0
{
pc
.
Command
=
[]
string
{
"/bin/sh"
,
"-c"
}
pc
.
Args
=
[]
string
{
versionInfo
.
ContainerCMD
}
}
pluginModel
,
err
:=
getPluginModel
(
pluginR
.
PluginID
,
as
.
TenantID
,
dbmanager
)
pluginModel
,
err
:=
getPluginModel
(
pluginR
.
PluginID
,
as
.
TenantID
,
dbmanager
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
nil
,
nil
,
fmt
.
Errorf
(
"get plugin model info failure %s"
,
err
.
Error
())
return
nil
,
nil
,
nil
,
fmt
.
Errorf
(
"get plugin model info failure %s"
,
err
.
Error
())
...
...
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