You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/architecture/autoscaling.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ On this page:
10
10
!!! info "OpenFaaS Pro feature"
11
11
This feature is included for [OpenFaaS Pro](/openfaas-pro/introduction) customers, and is designed for commercial use and production systems.
12
12
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.
14
14
15
15
Watch Alex's overview of auto-scaling in OpenFaaS at KubeCon:
16
16
@@ -32,9 +32,17 @@ Configuration is via a label on the function.
32
32
33
33
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.
34
34
35
-

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/grafana-dashboards)
36
40
> OpenFaaS Pro auto-scaling dashboard with Grafana
37
41
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
+
38
46
## How auto-scaling works
39
47
40
48
There are three auto-scaling modes described in the next section. This is how they work.
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.
Copy file name to clipboardExpand all lines: docs/deployment/pro.md
+40-13Lines changed: 40 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,8 @@ The Core platform features of OpenFaaS Standard and OpenFaaS for Enterprises con
19
19
20
20
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.
21
21
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
+
22
24
For OpenFaaS for Enterprises:
23
25
24
26
* Multiple namespaces are automatically detected and enabled, when you set `clusterRole: true` in the chart.
@@ -127,23 +129,26 @@ helm repo update && \
127
129
128
130
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.
129
131
130
-
##How to upgrade OpenFaaS
132
+
### Leader election
131
133
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.
133
135
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?
135
137
136
-
### Installing new Custom Resource Definitions (CRDs)
138
+
The ClusterRole is required for
137
139
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
139
142
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
142
144
143
-
To update the type 2 CRDs, you'll need to run the [steps under "2.1 CRDs in the ./crds folder
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).
145
150
146
-
### Automatic upgrades with ArgoCD or FluxCD
151
+
### Automatic updates with ArgoCD or FluxCD
147
152
148
153
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.
149
154
@@ -152,6 +157,16 @@ See also:
152
157
*[Bring GitOps to your OpenFaaS functions with ArgoCD](https://www.openfaas.com/blog/bring-gitops-to-your-openfaas-functions-with-argocd/)
153
158
*[Upgrade to Flux v2 to keep OpenFaaS up to date](https://www.openfaas.com/blog/upgrade-to-fluxv2-openfaas/)
154
159
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
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
197
223
198
224
[View chart](/openfaas-pro/builder)
199
225
200
-
### SSO & IAM
226
+
### Identity and Access Management (IAM) and Single-Sign On (SSO)
201
227
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.
203
229
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)
Copy file name to clipboardExpand all lines: docs/openfaas-pro/scale-to-zero.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,9 +21,7 @@ Read more on the blog:
21
21
22
22
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.
23
23
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.
0 commit comments