1
0
Fork 0
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:
Adam Janikowski 2023-12-14 16:57:46 +01:00 committed by GitHub
parent 7affabd731
commit 18133de938
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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