Unverified Commit c66a3bf4 authored by dp's avatar dp Committed by GitHub
Browse files

update plugin contianer command build way.

parent 5ba08821
Showing with 7 additions and 8 deletions
+7 -8
...@@ -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())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment