mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
[Improvement] [ML] Extract Pod Extension (#1543)
This commit is contained in:
parent
7affabd731
commit
18133de938
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue