Installation
This document describes how to install OpenFunction.
Prerequisites
You need to have a Kubernetes cluster.
You need to ensure your Kubernetes version meets the requirements described in the following compatibility matrix.
OpenFunction Version | Kubernetes 1.17 | Kubernetes 1.18 | Kubernetes 1.19 | Kubernetes 1.20+ |
---|---|---|---|---|
HEAD | N/A | N/A | N/A | √ |
v0.7.0 | N/A | N/A | N/A | √ |
v0.6.0 | √ | √ | √ | √ |
Install OpenFunction
Now you can install OpenFunction and all its dependencies with helm charts.
The
ofn
CLI install method is deprecated.
Requirements
- Kubernetes version:
>=v1.20.0-0
- Helm version:
>=v3.6.3
Steps to install OpenFunction helm charts
Run the following command to add the OpenFunction chart repository first:
helm repo add openfunction https://openfunction.github.io/charts/
helm repo update
Then you have several options to setup OpenFunction, you can choose to:
Install all components:
kubectl create namespace openfunction
helm install openfunction openfunction/openfunction -n openfunction --version 0.2.0
Install Serving only (without build):
kubectl create namespace openfunction
helm install openfunction --set global.ShipwrightBuild.enabled=false --set global.TektonPipelines.enabled=false openfunction/openfunction -n openfunction --version 0.2.0
Install Knative sync runtime only:
kubectl create namespace openfunction
helm install openfunction --set global.Keda.enabled=false openfunction/openfunction -n openfunction --version 0.2.0
Install OpenFunction async runtime only:
kubectl create namespace openfunction
helm install openfunction --set global.Contour.enabled=false --set global.KnativeServing.enabled=false openfunction/openfunction -n openfunction --version 0.2.0
Note
For more information about how to install OpenFunction with Helm, see Install OpenFunction with Helm.
Run the following command to verify OpenFunction is up and running:
kubectl get po -n openfunction
Uninstall OpenFunction
Helm
If you installed OpenFunction with Helm, run the following command to uninstall OpenFunction and its dependencies.
helm uninstall openfunction -n openfunction
Note
For more information about how to uninstall OpenFunction with Helm, see Uninstall OpenFunction with Helm.
Upgrade OpenFunction
helm upgrade [RELEASE_NAME] openfunction/openfunction -n openfunction
With Helm v3, CRDs created by this chart are not updated by default and should be manually updated. See also the Helm Documentation on CRDs.
Refer to helm upgrade for command documentation.
Upgrading an existing Release to a new version
From OpenFunction v0.6.0 to OpenFunction v0.7.x
There is a breaking change when upgrading from v0.6.0 to 0.7.x which requires additional manual operations.
Uninstall the Chart
First, you’ll need to uninstall the old openfunction
release:
helm uninstall openfunction -n openfunction
Confirm that the component namespaces have been deleted, it will take a while:
kubectl get ns -o=jsonpath='{range .items[?(@.metadata.annotations.meta\.helm\.sh/release-name=="openfunction")]}{.metadata.name}: {.status.phase}{"\n"}{end}'
If the knative-serving namespace is in the terminating state for a long time, try running the following command and remove finalizers:
kubectl edit ingresses.networking.internal.knative.dev -n knative-serving
Upgrade OpenFunction CRDs
Then you’ll need to upgrade the new OpenFunction CRDs
kubectl apply -f https://openfunction.sh1a.qingstor.com/crds/v0.7.0/openfunction.yaml
Upgrade dependent components CRDs
You also need to upgrade the dependent components’ CRDs
You only need to deal with the components included in the existing Release.
knative-serving CRDs
kubectl apply -f https://openfunction.sh1a.qingstor.com/crds/v0.7.0/knative-serving.yaml
shipwright-build CRDs
kubectl apply -f https://openfunction.sh1a.qingstor.com/crds/v0.7.0/shipwright-build.yaml
tekton-pipelines CRDs
kubectl apply -f https://openfunction.sh1a.qingstor.com/crds/v0.7.0/tekton-pipelines.yaml
Install new chart
helm repo update
helm install openfunction openfunction/openfunction -n openfunction
Note
For more information about how to upgrade OpenFunction with Helm, see Upgrade OpenFunction with Helm.