(dwTemplateSpec *v1alpha2.DevWorkspaceTemplateSpec)
| 236 | } |
| 237 | |
| 238 | func inferInitContainer(dwTemplateSpec *v1alpha2.DevWorkspaceTemplateSpec) *v1alpha2.Container { |
| 239 | image := InferWorkspaceImage(dwTemplateSpec) |
| 240 | if image != "" { |
| 241 | return &v1alpha2.Container{ |
| 242 | Image: image, |
| 243 | Command: []string{"/bin/sh", "-c"}, |
| 244 | Args: []string{initScript}, |
| 245 | } |
| 246 | } |
| 247 | return nil |
| 248 | } |
| 249 | |
| 250 | // EnsureHomeInitContainerFields ensures that an init-persistent-home container has |
| 251 | // the correct Command and VolumeMounts. |
no test coverage detected