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

Commit

Permalink
enable custom runtime declared via func spec
Browse files Browse the repository at this point in the history
  • Loading branch information
ngtuna committed Aug 23, 2017
1 parent 65289ff commit 8aa6803
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 8aa6803

Please sign in to comment.