MCPcopy Create free account
hub / github.com/devfile/devworkspace-operator / inferInitContainer

Function inferInitContainer

pkg/library/home/persistentHome.go:238–248  ·  view source on GitHub ↗
(dwTemplateSpec *v1alpha2.DevWorkspaceTemplateSpec)

Source from the content-addressed store, hash-verified

236}
237
238func 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.

Callers 1

addInitContainerFunction · 0.85

Calls 1

InferWorkspaceImageFunction · 0.85

Tested by

no test coverage detected