Sample Functions

Functions support multiple languages through the use of runtimes. To use a chosen runtime, add its name and version as a value in the spec.runtime field of the Function custom resource (CR). If this value is not specified, it defaults to nodejs16. Dependencies for a Node.js Function should be specified using the package.json file format. Dependencies for a Python Function should follow the format used by pip.

TIP: Read about Function’s specification if you are interested in its signature, event and context objects, and custom HTTP responses the Function returns.

See sample Functions for all available runtimes:

  • Node.js 16
  • Python 3.9