openfaas

Description

This provider adds support for OpenFaaS. It adds the openfaas module type and (by default) installs the faas-netes runtime to the project namespace. Each openfaas module maps to a single OpenFaaS function.
See the reference below for configuration options for faas-netes, and the module type docs for how to configure the individual functions.
Also see the openfaas example project for a simple usage example.
Below is the full schema reference for the provider configuration. For an introduction to configuring a Garden project with providers, please look at our configuration guide.
The reference is divided into two sections. The first section contains the complete YAML schema, and the second section describes each schema key.

Complete YAML Schema

The values in the schema below are the default values.
1
providers:
2
- # List other providers that should be resolved before this one.
3
dependencies: []
4
​
5
# If specified, this provider will only be used in the listed environments. Note that an empty array effectively
6
# disables the provider. To use a provider in all environments, omit this field.
7
environments:
8
​
9
# The name of the provider plugin to use.
10
name: openfaas
11
​
12
# The external URL to the function gateway, after installation. This is required if you set `faasNetes.values`
13
# or `faastNetes.install: false`, so that Garden can know how to reach the gateway.
14
gatewayUrl:
15
​
16
# The ingress hostname to configure for the function gateway, when `faasNetes.install: true` and not
17
# overriding `faasNetes.values`. Defaults to the default hostname of the configured Kubernetes provider.
18
#
19
# Important: If you have other types of services, this should be different from their ingress hostnames,
20
# or the other services should not expose paths under /function and /system to avoid routing conflicts.
21
hostname:
22
​
23
faasNetes:
24
# Set to false if you'd like to install and configure faas-netes yourself.
25
# See the [official instructions](https://docs.openfaas.com/deployment/kubernetes/) for details.
26
install: true
27
​
28
# Override the values passed to the faas-netes Helm chart. Ignored if `install: false`.
29
# See the [chart docs](https://github.com/openfaas/faas-netes/tree/master/chart/openfaas) for the available
30
# options.
31
#
32
# Note that this completely replaces the values Garden assigns by default, including `functionNamespace`,
33
# ingress configuration etc. so you need to make sure those are correctly configured for your use case.
34
values:
Copied!

Configuration Keys

providers[]

Type
Default
Required
array[object]
[]
No

providers[].dependencies[]

​providers > dependencies
List other providers that should be resolved before this one.
Type
Default
Required
array[string]
[]
No
Example:
1
providers:
2
- dependencies:
3
- exec
Copied!

providers[].environments[]

​providers > environments
If specified, this provider will only be used in the listed environments. Note that an empty array effectively disables the provider. To use a provider in all environments, omit this field.
Type
Required
array[string]
No
Example:
1
providers:
2
- environments:
3
- dev
4
- stage
Copied!

providers[].name

​providers > name
The name of the provider plugin to use.
Type
Default
Required
string
"openfaas"
Yes
Example:
1
providers:
2
- name: "openfaas"
Copied!

providers[].gatewayUrl

​providers > gatewayUrl
The external URL to the function gateway, after installation. This is required if you set faasNetes.values or faastNetes.install: false, so that Garden can know how to reach the gateway.
Type
Required
string
No
Example:
1
providers:
2
- gatewayUrl: "https://functions.mydomain.com"
Copied!

providers[].hostname

​providers > hostname
The ingress hostname to configure for the function gateway, when faasNetes.install: true and not overriding faasNetes.values. Defaults to the default hostname of the configured Kubernetes provider.
Important: If you have other types of services, this should be different from their ingress hostnames, or the other services should not expose paths under /function and /system to avoid routing conflicts.
Type
Required
string
No
Example:
1
providers:
2
- hostname: "functions.mydomain.com"
Copied!

providers[].faasNetes

​providers > faasNetes
Type
Default
Required
object
{"install":true}
No

providers[].faasNetes.install

​providers > faasNetes > install
Set to false if you'd like to install and configure faas-netes yourself. See the official instructions for details.
Type
Default
Required
boolean
true
No

providers[].faasNetes.values

​providers > faasNetes > values
Override the values passed to the faas-netes Helm chart. Ignored if install: false. See the chart docs for the available options.
Note that this completely replaces the values Garden assigns by default, including functionNamespace, ingress configuration etc. so you need to make sure those are correctly configured for your use case.
Type
Required
object
No
Last modified 26d ago