File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
internal/initplugins/gitplugin Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ type gitPlugin struct {
1212 Repourl string `required:"true" json:"repourl"`
1313 Branch string `json:"branch"`
1414 VolumeName string `required:"true" json:"volumeName"`
15+ Image string `required:"true" json:"image"`
1516 InitCommand string `json:"initCommand"`
1617}
1718
@@ -38,6 +39,7 @@ func (g *gitPlugin) GenerateInitContainerApplyConfiguration() *corev1apply.Conta
3839 command := fmt .Sprintf (`
3940 if [ ! -d /persistent/work ]; then
4041 mkdir -p /persistent/work;
42+ sudo apt install -y git;
4143 git clone -b ` + g .Branch + ` ` + g .Repourl + ` /persistent/work;
4244 %v
4345 else
@@ -47,7 +49,7 @@ func (g *gitPlugin) GenerateInitContainerApplyConfiguration() *corev1apply.Conta
4749
4850 initcontainer := corev1apply .Container ().
4951 WithName ("git" ).
50- WithImage ("alpine/git" ).
52+ WithImage (g . Image ).
5153 WithCommand ("sh" , "-c" , command ).
5254 WithVolumeMounts (corev1apply .VolumeMount ().
5355 WithName (g .VolumeName ).
You can’t perform that action at this time.
0 commit comments