From 8aa68037c387a9870bc2dc7a20045d3ed2af0709 Mon Sep 17 00:00:00 2001 From: Tuna Date: Thu, 24 Aug 2017 00:00:43 +0700 Subject: [PATCH] enable custom runtime declared via func spec --- pkg/utils/k8sutil.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/utils/k8sutil.go b/pkg/utils/k8sutil.go index 3c20b220d..d7ce8d76f 100644 --- a/pkg/utils/k8sutil.go +++ b/pkg/utils/k8sutil.go @@ -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,