Skip to content

Commit

Permalink
[Improvement] [ML] Extract Pod Extension (#1543)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajanikow authored Dec 14, 2023
1 parent 7affabd commit 18133de
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/util/k8sutil/pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,16 @@ func InjectPodTemplate(spec *sharedApi.PodTemplate, pod *core.PodTemplateSpec) e
return nil
}

func InjectContainersTemplate(spec *sharedApi.ContainerTemplate, pod *core.PodTemplateSpec, containers ...*core.Container) error {
for _, container := range containers {
if err := InjectContainerTemplate(spec, pod, container); err != nil {
return err
}
}

return nil
}

func InjectContainerTemplate(spec *sharedApi.ContainerTemplate, pod *core.PodTemplateSpec, container *core.Container) error {
if err := InjectImageDetails(spec.GetImage(), pod, container); err != nil {
return err
Expand Down

0 comments on commit 18133de

Please sign in to comment.