Language packs

Language packs can be used to extend Knative Functions to support additional runtimes, function signatures, operating systems, and installed tooling for functions. Language Packs are distributed through Git repositories or as a directory on a disc.

For more information see the language pack documentation.

Using external Git repositories

When creating a new function, a Git repository can be specified as the source for the template files. The Knative Sandbox maintains a set of example templates which can be used during project creation.

For example, you can run the following command to use the metacontroller template for Node.js:

  1. func create myfunc -l nodejs -t metacontroller --repository https://github.com/knative-sandbox/func-tastic

Installing language packs locally

Language packs can be installed locally by using the func repository command.

For example, to add the Knative Sandbox example templates, you can run the following command:

  1. func repository add knative https://github.com/knative-sandbox/func-tastic

After the Knative Sandbox example templates are installed, you can use the metacontroller template by specifying the knative prefix in the create command:

  1. func create -t knative/metacontroller -l nodejs my-controller-function