openshift-cloud-functions / js-function-operator

R&P for an operator to deploy and execute Node.js functions as Knative Services on Kubernetes
MIT License
1 stars 3 forks source link

feat: rebuild the runtime when a function changes #16

Closed lance closed 5 years ago

lance commented 5 years ago

Fixes: https://github.com/openshift-cloud-functions/js-function-operator/issues/13

Extract all of the build code into a separate file, and adjust the logic in the controller so that the ConfigMap is updated and a new TaskRun is created when the function source changes.

lance commented 5 years ago

@zroubalik @slinkydeveloper I've been thinking about this PR and doing some work on another branch that is a complete reworking of this. I think maybe it would be better to have a JSFunctionBuild CRD that is responsible for managing the PipelineResource and PipelineRuns for a given function. I've got that operator written[1]. Doing this would allow the JSFunction operator to simply create the eventing bits, create and update the ConfigMap, and create and update the JSFunctionBuild when the function changes. The separation of concerns here is good, and would make everything a little cleaner. Any thoughts on this?

[1] js-function-build-operator

zroubalik commented 5 years ago

@zroubalik @slinkydeveloper I've been thinking about this PR and doing some work on another branch that is a complete reworking of this. I think maybe it would be better to have a JSFunctionBuild CRD that is responsible for managing the PipelineResource and PipelineRuns for a given function. I've got that operator written[1]. Doing this would allow the JSFunction operator to simply create the eventing bits, create and update the ConfigMap, and create and update the JSFunctionBuild when the function changes. The separation of concerns here is good, and would make everything a little cleaner. Any thoughts on this?

[1] js-function-build-operator

Sorry, missed this somehow. I like the idea! Will look at the other PR.

lance commented 5 years ago

I have removed the js-function-build-operator repository and instead added the type and controller to this project. I'm going to close this PR now in favor of https://github.com/openshift-cloud-functions/js-function-operator/pull/20