Skip to content
This repository was archived by the owner on Jun 7, 2021. It is now read-only.

Commit 0f9c13a

Browse files
committed
src: don't mount the configmap in the service pod
Because now we are running a tekton task to build a runtime image, we just need to specify the runtime image name.
1 parent 2c7ed7d commit 0f9c13a

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

pkg/controller/jsfunction/jsfunction_controller.go

+2-12
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ func (r *ReconcileJSFunction) serviceForFunction(f *faasv1alpha1.JSFunction, con
307307
},
308308
Spec: knv1alpha1.RevisionSpec{
309309
RevisionSpec: knv1beta1.RevisionSpec{
310-
PodSpec: createPodSpec(f.Name, configMapName, imageName),
310+
PodSpec: createPodSpec(f.Name, imageName),
311311
},
312312
},
313313
},
@@ -324,25 +324,15 @@ func (r *ReconcileJSFunction) serviceForFunction(f *faasv1alpha1.JSFunction, con
324324
return service, nil
325325
}
326326

327-
func createPodSpec(functionName, configMapName string, imageName string) corev1.PodSpec {
328-
volumeName := fmt.Sprintf("%s-source", functionName)
327+
func createPodSpec(functionName, imageName string) corev1.PodSpec {
329328
return corev1.PodSpec{
330329
Containers: []corev1.Container{{
331330
Image: imageName,
332331
Name: fmt.Sprintf("nodejs-%s", functionName),
333332
Ports: []corev1.ContainerPort{{
334333
ContainerPort: 8080,
335334
}},
336-
VolumeMounts: []corev1.VolumeMount{
337-
{
338-
Name: volumeName,
339-
MountPath: "/home/node/usr",
340-
},
341-
},
342335
}},
343-
Volumes: []corev1.Volume{
344-
createConfigMapVolume(volumeName, configMapName),
345-
},
346336
}
347337
}
348338

0 commit comments

Comments
 (0)