Skip to content

Commit b977980

Browse files
committed
Updates to autoscaling and pro installation notes
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent c6c91d7 commit b977980

File tree

4 files changed

+52
-19
lines changed

4 files changed

+52
-19
lines changed

docs/architecture/autoscaling.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ On this page:
1010
!!! info "OpenFaaS Pro feature"
1111
This feature is included for [OpenFaaS Pro](/openfaas-pro/introduction) customers, and is designed for commercial use and production systems.
1212

13-
The [OpenFaaS Pro](/openfaas-pro/introduction/) Scaler scales functions horizontally between a minimum and maximum number of replicas, or to zero.
13+
The [OpenFaaS Pro](/openfaas-pro/introduction/) Autoscaler scales functions horizontally between a minimum and maximum number of replicas, or to zero.
1414

1515
Watch Alex's overview of auto-scaling in OpenFaaS at KubeCon:
1616

@@ -32,9 +32,17 @@ Configuration is via a label on the function.
3232

3333
All calls made through the gateway whether to a synchronous function `/function/` route or via the asynchronous `/async-function` route count towards this method of auto-scaling.
3434

35-
![OpenFaaS Pro auto-scaling dashboard with Grafana](https://pbs.twimg.com/media/FJ9EBVdWQAM9DeW?format=jpg&name=medium)
35+
**Monitor what the autoscaler is doing**
36+
37+
The best way to monitor the load on functions, and the decisions of the autoscaler is through the Grafana dashboard which is included with OpenFaaS Pro. The overview dashboard shows everything you need to know at a glance across all functions, and the spotlight dashboard shows just the one function you select.
38+
39+
[![OpenFaaS Pro auto-scaling dashboard with Grafana](/images/grafana/overview-dashboard.png)](/openfaas-pro/grafana-dashboards)
3640
> OpenFaaS Pro auto-scaling dashboard with Grafana
3741
42+
In addition to the dashboards, you can monitor the calculations and decisions of the autoscaler.
43+
44+
By default, only API calls to the scale endpoint will be logged, to reduce the load and the amount of logs that may need to be stored. Set `verbose` flag to `true` in the Helm chart under the `autoscaler` section to view each turn or iteration of the `[Scaler]` and `[Idler]` Goroutines as they make decisions.
45+
3846
## How auto-scaling works
3947

4048
There are three auto-scaling modes described in the next section. This is how they work.

docs/architecture/gateway.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Click below to view the image full-size:
66

77
[![OpenFaaS Conceptual architecture](../images/of-conceptual-operator.png)](../images/of-conceptual-operator.png)
88

9-
When deployed each function creates 1 to many Pods/containers depending on the minimum and maximum scaling parameters requested by the user. Functions can also scale to zero and back again through use of the faas-idler or the REST API.
9+
When deployed each function creates 1 to many Pods/containers depending on the minimum and maximum scaling parameters requested by the user. Functions can also scale to zero and back again through use of the idler in the OpenFaaS Pro Autoscaler or the OpenFaaS Pro REST API.
1010

1111
See also: [auto-scaling](autoscaling.md).
1212

docs/deployment/pro.md

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ The Core platform features of OpenFaaS Standard and OpenFaaS for Enterprises con
1919

2020
The Core platform is installed using the same Helm chart as OpenFaaS CE, only with some additional values set, to deploy the additional Pro components and versions.
2121

22+
Optional components include event connectors, such as: the Kafka connector, SQS, SNS, and PostgreSQL connector. You can find details for each in the OpenFaaS Pro docs referenced above.
23+
2224
For OpenFaaS for Enterprises:
2325

2426
* Multiple namespaces are automatically detected and enabled, when you set `clusterRole: true` in the chart.
@@ -127,23 +129,26 @@ helm repo update && \
127129

128130
It is essential that you keep hold of any custom values.yaml files that you create or use during installation. These are needed in order to receive support from OpenFaaS Ltd and to upgrade your installation.
129131

130-
## How to upgrade OpenFaaS
132+
### Leader election
131133

132-
OpenFaaS Standard and For Enterprises are both installed and upgraded in the same way, so you use the same `helm upgrade --install` command from the second above. There is no reason to "uninstall" the helm chart to perform an upgrade.
134+
Each OpenFaaS gateway deployment contains both the gateway and the operator. The operator is responsible for managing the Function CRD, and creating Kubernetes resources such as Services and Deployments in response to changes in the Function CRD. If you are running more than one replica of the gateway deployment, then you must enable leaderElection to avoid conflicts and warnings between the operator instances.
133135

134-
The only time that `helm upgrade --install` may not work is when you are changing from `clusterRole: false` to `clusterRole: true`. In this instance, you will need to delete the conflicting Kubernetes objects one by one as directed by the output from helm, before running `helm upgrade --install` again.
136+
### What happens if you disable the ClusterRole?
135137

136-
### Installing new Custom Resource Definitions (CRDs)
138+
The ClusterRole is required for
137139

138-
CRDs are split into two categories:
140+
* OpenFaaS Standard and for Enterprises for Prometheus in order to discover and scrape node-level metrics for monitoring, API metrics and CPU-based autoscaling
141+
* OpenFaaS for Enterprises to manage functions in various namespaces
139142

140-
1. Those that are bundled via the chart and updated on each installation/update - including Function, Profile and FunctionIngress.
141-
2. Those which are required before the chart is installed for IAM policies.
143+
## How to upgrade OpenFaaS
142144

143-
To update the type 2 CRDs, you'll need to run the [steps under "2.1 CRDs in the ./crds folder
144-
"](https://github.com/openfaas/faas-netes/blob/master/chart/openfaas/crds/README.md).
145+
OpenFaaS Standard and For Enterprises are both installed and upgraded in the same way, so you use the same `helm upgrade --install` command from the second above. There is no reason to "uninstall" the helm chart to perform an upgrade.
146+
147+
The only time that `helm upgrade --install` may not work is when you are changing from `clusterRole: false` to `clusterRole: true`. In this instance, you will need to delete the conflicting Kubernetes objects one by one as directed by the output from helm, before running `helm upgrade --install` again.
148+
149+
We recommend upgrading OpenFaaS every 1-2 weeks to ensure you have the latest fixes, security patches and features. Breaking changes are rare, and are published in the [Customer Community](https://github.com/openfaas/customers).
145150

146-
### Automatic upgrades with ArgoCD or FluxCD
151+
### Automatic updates with ArgoCD or FluxCD
147152

148153
You can use ArgoCD or FluxCD to manage the installation of OpenFaaS by providing a custom values.yaml file. In this way, newer versions of the OpenFaaS components and Helm chart will be applied automatically, as they become available.
149154

@@ -152,6 +157,16 @@ See also:
152157
* [Bring GitOps to your OpenFaaS functions with ArgoCD](https://www.openfaas.com/blog/bring-gitops-to-your-openfaas-functions-with-argocd/)
153158
* [Upgrade to Flux v2 to keep OpenFaaS up to date](https://www.openfaas.com/blog/upgrade-to-fluxv2-openfaas/)
154159

160+
### Installing new Custom Resource Definitions (CRDs)
161+
162+
CRDs are split into two categories:
163+
164+
1. Those that are bundled via the chart and updated on each installation/update - including Function, Profile and FunctionIngress. These are kept as templates so that they are updated whenever the chart is updated.
165+
2. Those which are required before the chart is installed for IAM policies. The second category is required at installation time due to installing instances of these Custom Resources at installation time.
166+
167+
To update the type 2 CRDs, you'll need to run the [steps under "2.1 CRDs in the ./crds folder
168+
"](https://github.com/openfaas/faas-netes/blob/master/chart/openfaas/crds/README.md).
169+
155170
## How to check your installation
156171

157172
We recommend running the OpenFaaS config checker after installation is complete. This will help verify that your installation is correct.
@@ -178,6 +193,17 @@ There are a number of event connectors for OpenFaaS, all of which are installed
178193

179194
[View helm charts for event connectors](https://github.com/openfaas/faas-netes/tree/master/chart)
180195

196+
### Dedicated queues and queue-workers
197+
198+
There is a separate Helm chart that you can install to provision and manage queue-workers for dedicated queues.
199+
200+
Dedicated queues are useful tenant-level isolation, or to provide a higher Quality of Service (QoS) for certain functions.
201+
202+
Learn more:
203+
204+
* [JetStream queue-worker](/openfaas-pro/jetstream/#multiple-queues)
205+
* [Dedicated JetStream queue-worker helm chart](https://github.com/openfaas/faas-netes/tree/master/chart/queue-worker)
206+
181207
### OpenFaaS Pro CLI
182208

183209
The OpenFaaS Pro CLI provides additional functionality on top of faas-cli, such as build-time secrets, and a `local-run` command to try out functions without deploying them.
@@ -197,8 +223,9 @@ The OpenFaaS Pro Function Builder API can be deployed through a [separate Helm c
197223

198224
[View chart](/openfaas-pro/builder)
199225

200-
### SSO & IAM
226+
### Identity and Access Management (IAM) and Single-Sign On (SSO)
201227

202-
Single-Sign On and IAM are closely related and are often configured at the same time.
228+
Identity and Access Management (IAM) and Single-Sign On (SSO) are closely related and are often configured at the same time. IAM is how Identity Providers (IdPs) are configured and how users are authenticated and authorised. Single-Sign On is how users leverage an IdP to authenticate and authorise themselves to the OpenFaaS dashboard, API and CLI.
203229

204-
See our walkthrough for an overview of how this works: [Walkthrough of Identity and Access Management (IAM) for OpenFaaS](https://www.openfaas.com/blog/walkthrough-iam-for-openfaas/).
230+
* [Identity and Access Management (IAM)](/openfaas-pro/iam/overview)
231+
* [Single-Sign On (SSO)](/openfaas-pro/sso/overview)

docs/openfaas-pro/scale-to-zero.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ Read more on the blog:
2121

2222
Scale to Zero is enabled automatically when you install OpenFaaS Pro with helm and set `autoscaler.enabled: true`. You can see a sample configuration for [OpenFaaS Pro](https://github.com/openfaas/faas-netes/blob/master/chart/openfaas/values-pro.yaml) here.
2323

24-
!!! info "Remember faas-idler?"
25-
26-
If you worked with an older version of OpenFaaS Pro, then you'll remember faas-idler. It has now been replaced by the [OpenFaaS Pro autoscaler](/architecture/autoscaling) which performs both Horizontal Scaling of functions between their minimum and maximum replica count, and down to zero.
24+
Scale to zero is controlled by the [OpenFaaS Pro autoscaler](/architecture/autoscaling) which also performs Horizontal Scaling of functions between the default or configured minimum and maximum replica counts.
2725

2826
## Usage
2927

0 commit comments

Comments
 (0)