2

Spring Cloud Function is a way to write serverless functions with Spring Boot. There are only adapters for AWS, Azure, etc. but no way to deploy to OpenFaaS yet.

How do I deploy a Spring Cloud Function to OpenFaaS?

Klaus
  • 1,080
  • 2
  • 10
  • 27

1 Answers1

1

I created something using the official Java11 template but I am not sure if this is a good solution. You can find the code here: https://github.com/PySualk/spring-cloud-function-openfaas

Klaus
  • 1,080
  • 2
  • 10
  • 27
  • I've managed to deploy your function on selfhosted openfaas. As we have now Spring Boot 3, with Spring Native based on Grall VM, do you think it could be possible to use it in this function? – Marx Apr 23 '23 at 20:46
  • Spring Boot 3 required Java 17 (https://spring.io/blog/2022/05/24/preparing-for-spring-boot-3-0). I just checked and there is only the Java11 template in the official OpenFaas repo. Maybe OpenFaas is not the right solution if you want to work with Java... but I am not quite sure ;-) – Klaus Apr 24 '23 at 11:29
  • I've forked your code and adapted it to Spring Boot 3 and Java 17: https://github.com/Marx2/spring-cloud-function-openfaas It deploy & starts, but I have some problems with communication: https://github.com/openfaas/faas/issues/1790 – Marx Apr 25 '23 at 12:30