Skip to content

Commit 5643158

Browse files
committed
Couple of updates for the README
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent c6929a1 commit 5643158

File tree

1 file changed

+31
-26
lines changed

1 file changed

+31
-26
lines changed

chart/openfaas/README.md

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ helm repo add openfaas https://openfaas.github.io/faas-netes/
7171
Now decide how you want to expose the services and edit the `helm upgrade` command as required.
7272

7373
* To use NodePorts/ClusterIP - (the default and best for development, with port-forwarding)
74-
* To use an IngressController add `--set ingress.enabled=true` (recommended for production, for use with TLS)
74+
* To use an IngressController add `--set ingress.enabled=true` (recommended for production, for use with TLS) - [follow the full guide](https://docs.openfaas.com/reference/tls-openfaas/)
7575
* To use a LoadBalancer add `--set serviceType=LoadBalancer` (not recommended, since it will expose plain HTTP)
7676

7777
#### Deploy OpenFaaS Community Edition (CE)
@@ -270,19 +270,17 @@ echo -n $PASSWORD | faas-cli login -g $OPENFAAS_URL -u admin --password-stdin
270270
faas-cli version
271271
```
272272

273-
## OpenFaaS Operator and Function CRD
273+
### faas-netes (controller) vs OpenFaaS Operator
274274

275-
If you would like to work with Function CRDs there is an alternative controller to faas-netes named [OpenFaaS Operator](https://github.com/openfaas-incubator/openfaas-operator) which can be swapped in at deployment time.
276-
The OpenFaaS Operator is suitable for development and testing and may replace the faas-netes controller in the future.
277-
The Operator is compatible with Kubernetes 1.9 or later.
275+
OpenFaaS CE uses the old "controller" mode of OpenFaaS, where Kubernetes objects are directly modified by the HTTP API call. If the HTTP call fails, the objects may not be updated or create successfully.
278276

279-
To use it, add the flag: `--set operator.create=true` when installing with Helm.
277+
OpenFaaS Pro uses a more idiomatic Kubernetes integration through the use of [CustomResourceDefinitions](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/). The operator pattern used with the CRD means that you can interact with a "Function" Custom Resource along with the HTTP REST API.
280278

281-
### faas-netes vs OpenFaaS Operator
279+
The HTTP REST endpoints all interact with the Function CRD, then the operator watches for changes and updates the Kubernetes objects accordingly, retrying, backing off, and reporting the progress via the .Status field.
282280

283-
The faas-netes controller is the most tested, stable and supported version of the OpenFaaS integration with Kubernetes. In contrast the OpenFaaS Operator is based upon the codebase and features from `faas-netes`, but offers a tighter integration with Kubernetes through [CustomResourceDefinitions](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/). This means you can type in `kubectl get functions` for instance.
281+
Some long-time OpenFaaS Pro users still use the controller mode, for backwards compatibility. It should be considered deprecated and will be removed in the future. No no users should adopt it for this reason.
284282

285-
See also: [Introducing the OpenFaaS Operator](https://www.openfaas.com/blog/kubernetes-operator-crd/)
283+
See also: [How and why you should upgrade to the Function Custom Resource Definition (CRD)](https://www.openfaas.com/blog/upgrade-to-the-function-crd/)
286284

287285
## Deployment with `helm template`
288286

@@ -316,33 +314,31 @@ Now [verify your installation](#verify-the-installation).
316314

317315
## Exposing services
318316

319-
### NodePorts
320317

321-
By default a NodePort will be created for the API Gateway.
318+
### Deploy with an IngressController
322319

323-
### Metrics
320+
Use the following guide to setup TLS for the [Gateway and Dashboard](https://docs.openfaas.com/reference/tls-openfaas/).
324321

325-
You temporarily access the Prometheus metrics by using `port-forward`
322+
If you are using Ingress locally, for testing, then you can access the gateway by adding:
326323

327-
```sh
328-
kubectl --namespace openfaas port-forward deployment/prometheus 31119:9090
324+
```yaml
325+
ingress:
326+
enabled: true
329327
```
330328

331-
Then open `http://localhost:31119` to directly query the OpenFaaS metrics scraped by Prometheus.
332-
333-
### LB
329+
Update the fields for the `ingress` section of values.yaml
334330

335-
If you're running on a cloud such as AKS or GKE you will need to pass an additional flag of `--set serviceType=LoadBalancer` to tell `helm` to create LoadBalancer objects instead. An alternative to using multiple LoadBalancers is to install an Ingress controller.
331+
By default, the name `gateway.openfaas.local` will be used with HTTP access only, without TLS.
336332

337-
### Deploy with an IngressController
333+
### NodePorts
338334

339-
In order to make use of automatic ingress settings you will need an IngressController in your cluster such as Traefik or Nginx.
335+
By default a NodePort will be created for the OpenFaaS Gateway on port 31112, you can prevent this by setting `exposeServices` to `false`, or `serviceType` to `ClusterIP`.
340336

341-
Add `--set ingress.enabled` to enable ingress pass `--set ingress.enabled=true` when running the installation via `helm`.
337+
### LoadBalancer (not recommended)
342338

343-
By default services will be exposed with following hostnames (can be changed, see values.yaml for details):
339+
There is no reason to use a LoadBalancer for OpenFaaS, because it will expose the gateway using plain-text HTTP, and you will have no encryption.
344340

345-
* `gateway.openfaas.local`
341+
This flag is controlled by `--set serviceType=LoadBalancer`, which creates a new gateway service of type LoadBalancer.
346342

347343
### Endpoint load-balancing
348344

@@ -358,11 +354,20 @@ Some configurations in combination with client-side KeepAlive settings may becau
358354

359355
In this mode, all invocations will pass through the gateway to faas-netes, which will look up endpoint IPs directly from Kubernetes, the additional hop may add some latency, but will do fair load-balancing, even with KeepAlive.
360356

361-
### SSL / TLS
362357

363-
If you require TLS/SSL then please make use of an IngressController. A full guide is provided to [enable TLS for the OpenFaaS Gateway using cert-manager and Let's Encrypt](https://docs.openfaas.com/reference/ssl/kubernetes-with-cert-manager/).
358+
### Metrics
359+
360+
You temporarily access the Prometheus metrics by using `port-forward`
361+
362+
```sh
363+
kubectl --namespace openfaas port-forward deployment/prometheus 31119:9090
364+
```
365+
366+
Then open `http://localhost:31119` to directly query the OpenFaaS metrics scraped by Prometheus.
367+
364368

365369
### Service meshes
370+
366371
If you use a service mesh like Linkerd or Istio in your cluster, then you should enable the `directFunctions` mode using:
367372

368373
```sh

0 commit comments

Comments
 (0)