Guide
You can use the OpenFaaS helm chart to generate custom YAML files for your OpenFaaS installation on ARMHF and ARM64.
Why? tiller
is not available for ARM so we cannot customize the chart that way.
So instead we ship some defaults for the community which you can then tweak as you see fit.
But what might you want to change?
httpProbe
- this is a much faster way to check functions are healthy than the defaultexecProbe
basicAuth
- you may want to expose your cluster to the internet and therefore enable authentication- fine-tuning - you can fine-tune any of the values found in the main faas-netes chart
- Super-charging the templates - the of-watchdog and new Golang template is probably one of the fastest so far
helm
Get curl -L https://git.io/get_helm.sh | bash
Now:
helm init --client-only
helm repo add openfaas https://openfaas.github.io/faas-netes/
helm repo update
Get faas-netes
You may need git
:
sudo apt install -qy git
Clone the repo:
git clone https://github.com/openfaas/faas-netes
cd faas-netes
Checkout the options
cat chart/openfaas/values.yaml
Decide what you like, what you want to customize and then add the values to one of the following:
./contrib/values-armhf.yaml
./contrib/values-arm64.yaml
Regenerate the YAML files
make charts
You'll see on git diff
that the charts have been updated.
Test it out
Now apply the new files:
kubectl apply -f ./namespaces.yml,./yaml_armhf
# or
kubectl apply -f ./namespaces.yml,./yaml_arm64
httpProbe
for more efficient function health-checks
Example - Edit ./contrib/values-armhf.yaml
:
faasnetes:
image: openfaas/faas-netes:0.8.0-armhf
httpProbe: true # Setting to true will use HTTP for readiness and liveness (incompatible with Istio < 1.1.5)
Now apply:
make charts
kubectl apply -f ./namespaces.yml,./yaml_armhf
basicAuth
Example - enable Edit ./contrib/values-armhf.yaml
:
basic_auth: true
Create your basic-auth
secret:
# generate a random password
PASSWORD=$(head -c 12 /dev/urandom | shasum| cut -d' ' -f1)
kubectl -n openfaas create secret generic basic-auth \
--from-literal=basic-auth-user=admin \
--from-literal=basic-auth-password="$PASSWORD"
Apply:
make charts
kubectl apply -f ./namespaces.yml,./yaml_armhf
Attempt to access the gateway without auth:
curl -i 127.0.0.1:31112/system/functions
Super-charging the templates
Try these two super-fast templates:
First run faas-cli template pull https://
Then faas-cli new --list
Use the templates ending in -armhf
This guide is using helm v2, why not helm 3?