Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
Merge pull request #271 from ngtuna/custom-runtime
Browse files Browse the repository at this point in the history
Allow custom runtime declared via func spec
  • Loading branch information
sebgoa authored Aug 27, 2017
2 parents a12d72e + 8aa6803 commit a853762
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/utils/k8sutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,9 @@ func EnsureK8sResources(ns, name string, funcObj *spec.Function, client kubernet
if len(dpm.Spec.Template.Spec.Containers) == 0 {
dpm.Spec.Template.Spec.Containers = append(dpm.Spec.Template.Spec.Containers, v1.Container{})
}
dpm.Spec.Template.Spec.Containers[0].Image = imageName
if dpm.Spec.Template.Spec.Containers[0].Image == "" {
dpm.Spec.Template.Spec.Containers[0].Image = imageName
}
dpm.Spec.Template.Spec.Containers[0].Name = name
dpm.Spec.Template.Spec.Containers[0].Ports = append(dpm.Spec.Template.Spec.Containers[0].Ports, v1.ContainerPort{
ContainerPort: 8080,
Expand Down

0 comments on commit a853762

Please sign in to comment.