Prerequisite: For this lab, Argo CD needs to be activated.
Otomi uses Knative serving for serverless (or Function as a Service) support.
As a developer, you'll have the following options to deploy serverless workloads:
- BYO Knative service manifest and deploy it using kubectl or ArgoCD
- Create workloads with the deployment Helm chart in
- Create workloads with the Knative Helm chart in
In this lab we're going to create a workload in Otomi to create a Knative service using the knative chart in
Create a Function as a Service workload
You can create a workload to deploy your own Helm chart, or you can use one of the
otomi-charts Helm charts. In this case we'll use the deployment chart in the
- Go to
Workloadsin the left menu and click on
Function as a Service
- Enter a name for the workload
- Fill in the image to deploy:
- Fill in the tag of the image to deploy:
Note: When creating a Function as a Service workload, the Min Instances will by default be set to
0 to enable
Scale to Zero.
- Review the values. Here you can add more values supported by the otomi-charts
Now click on
After a few minutes, Otomi will have created all the needed Argo CD resources to deploy your workload. In the workloads list, click on the
Application link of your workload to see the status of your workload.
The values of a workload can be changed at any time. Changes will automatically be deployed.
(optionally) Publicly expose the service
- In the left menu panel under click
Servicesthen click on
- Select the name of the (existing) knative service:
Exposure Ingress, select
Ingressand use the default configuration
- Click on
- Click on
Deploy Changes(the Deploy Changes button in the left panel will light-up after you click on submit).