Skip to content

Commit 099b219

Browse files
committed
Remove ceScaling option make generateBasicAuth default
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent f47e776 commit 099b219

File tree

6 files changed

+25
-25
lines changed

6 files changed

+25
-25
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@ of_kind_portforward.pid
3030
/chart/pro-builder/out
3131
/chart/pro-builder/payload.txt
3232
/pgconnector.yaml
33+
34+
jwt_key
35+
jwt_key.pub

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ faas-netes can be configured with environment variables, but for a full set of o
8282

8383
| Option | Usage |
8484
| --------------------------- | ------------------------------------------------------------------------------------------------ |
85-
| `httpProbe` | Boolean - use http probe type for function readiness and liveness. Default: `false` |
85+
| `httpProbe` | Boolean - use http probe type for function readiness and liveness. Default: `true` |
8686
| `write_timeout` | HTTP timeout for writing a response body from your function (in seconds). Default: `60s` |
8787
| `read_timeout` | HTTP timeout for reading the payload from the client caller (in seconds). Default: `60s` |
8888
| `image_pull_policy` | Image pull policy for deployed functions (`Always`, `IfNotPresent`, `Never`). Default: `Always` |

chart/openfaas/README.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ If you wish to continue without using arkade, read on for instructions.
3838

3939
### 2) Install with helm
4040

41-
These instructions are for Intel (normal computers), jump to the end of the document for ARM and Raspberry Pi.
42-
4341
To use the chart, you will need to use Helm 3:
4442

4543
Get it from arkade:
@@ -88,8 +86,7 @@ Deploy CE from the helm chart repo directly:
8886
helm repo update \
8987
&& helm upgrade openfaas --install openfaas/openfaas \
9088
--namespace openfaas \
91-
--set functionNamespace=openfaas-fn \
92-
--set generateBasicAuth=true
89+
--set functionNamespace=openfaas-fn
9390
```
9491

9592
> The above command will also update your helm repo to pull in any new releases.
@@ -101,8 +98,6 @@ PASSWORD=$(kubectl -n openfaas get secret basic-auth -o jsonpath="{.data.basic-a
10198
echo "OpenFaaS admin password: $PASSWORD"
10299
```
103100

104-
It is not recommended to disable basic authentication.
105-
106101
#### Deploy OpenFaaS Pro
107102

108103
* Create the required secret with your [OpenFaaS Pro license](https://www.openfaas.com/pricing/):
@@ -114,20 +109,34 @@ kubectl create secret generic \
114109
--from-file license=$HOME/.openfaas/LICENSE
115110
```
116111

112+
If you wish to use the OpenFaaS Pro dashboard, [you must run the steps to "Create a signing key"](https://docs.openfaas.com/openfaas-pro/dashboard/#installation) before installing the Helm chart.
113+
117114
Now deploy OpenFaaS from the helm chart repo:
118115

119116
```sh
120117
helm repo update \
121118
&& helm upgrade openfaas --install openfaas/openfaas \
122119
--namespace openfaas \
123120
--set functionNamespace=openfaas-fn \
124-
--set generateBasicAuth=true \
125121
--set openfaasPro=true \
126122
--set autoscaler.enabled=true
127123
```
128124

129125
The main change here is to add: `--set openfaasPro=true`
130126

127+
For production, we recommend creating your own values.yaml file, but make sure you do not copy any more settings into it than strictly necessary. This way the file can be maintained easily over time.
128+
129+
Example installation with a values.yaml file instead of using `--set`:
130+
131+
```sh
132+
helm repo update \
133+
&& helm upgrade openfaas --install openfaas/openfaas \
134+
--namespace openfaas \
135+
--set functionNamespace=openfaas-fn \
136+
-f values.yaml \
137+
-f values-pro.yaml
138+
```
139+
131140
You can also review recommended Pro values in [values-pro.yaml](values-pro.yaml)
132141

133142
#### Installing OpenFaaS Pro without Cluster Admin access
@@ -152,7 +161,6 @@ You can run the following command from within the `faas-netes` folder, not the c
152161
helm upgrade openfaas --install chart/openfaas \
153162
--namespace openfaas \
154163
--set functionNamespace=openfaas-fn \
155-
--set generateBasicAuth=true \
156164
-f ./chart/openfaas/values.yaml \
157165
-f ./chart/openfaas/values-pro.yaml
158166
```
@@ -405,12 +413,6 @@ kubectl delete namespace openfaas openfaas-fn
405413

406414
In some cases your additional functions may need to be either deleted before deleting the chart with `faas-cli` or manually deleted using `kubectl delete`.
407415

408-
## ARM and Raspberry Pi
409-
410-
OpenFaaS container images are currently published as multi-arch for ARM64, armhf and `x64_64`. It's recommended that you use [arkade](https://get-arkade.dev) to install, or use the appropriate values.yaml file.
411-
412-
See also: [Kubernetes and Raspberry Pi in the docs](https://docs.openfaas.com/deployment/kubernetes)
413-
414416
## Kubernetes versioning
415417

416418
This Helm chart currently supports version 1.16+
@@ -424,6 +426,7 @@ Feel free to seek out help using the [OpenFaaS Slack workspace](https://slack.op
424426
## Configuration
425427

426428
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
429+
427430
See [values.yaml](./values.yaml) for detailed configuration.
428431

429432
### General parameters
@@ -435,6 +438,7 @@ yaml) |
435438
| `async` | Enables asynchronous function invocations. If `.nats.external.enabled` is `false`, also deploys NATS | `true` |
436439
| `queueMode` | Set to `jetstream` to run the async system backed by NATS JetStream. By default the async system uses NATS Streaming|
437440
| `basic_auth` | Enable basic authentication on the gateway and Prometheus. Warning: do not disable. | `true` |
441+
| `generateBasicAuth` | Generate admin password for basic authentication | `true` |
438442
| `basicAuthPlugin.image` | Container image used for basic-auth-plugin | See [values.yaml](./values.yaml) |
439443
| `basicAuthPlugin.replicas` | Replicas of the basic-auth-plugin | `1` |
440444
| `basicAuthPlugin.resources` | Resource limits and requests for basic-auth-plugin containers | See [values.yaml](./values.yaml) |
@@ -443,7 +447,6 @@ yaml) |
443447
| `exposeServices` | Expose `NodePorts/LoadBalancer` | `true` |
444448
| `functionNamespace` | Functions namespace, preferred `openfaas-fn` | `openfaas-fn` |
445449
| `gatewayExternal.annotations` | Annotation for getaway-external service | `{}` |
446-
| `generateBasicAuth` | Generate admin password for basic authentication | `false` |
447450
| `httpProbe` | Setting to true will use HTTP for readiness and liveness probe on the OpenFaaS system Pods (compatible with Istio >= 1.1.5) | `true` |
448451
| `ingress.enabled` | Create ingress resources | `false` |
449452
| `istio.mtls` | Create Istio policies and destination rules to enforce mTLS for OpenFaaS components and functions | `false` |

chart/openfaas/templates/prometheus-cfg.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ data:
160160
rules:
161161
- alert: service_down
162162
expr: up == 0
163-
{{- if or (eq .Values.openfaasPro false) (eq (or .Values.ceScaling false) true) }}
163+
{{- if eq .Values.openfaasPro false }}
164164
- alert: APIHighInvocationRate
165165
expr: sum(rate(gateway_function_invocation_total{code="200"}[10s])) BY (function_name) > 5
166166
for: 5s

chart/openfaas/values-pro.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ operator:
1313
create: true
1414

1515
# Enable authentication on all OpenFaaS core components.
16-
# You must not turn off basicAuth, however, you can pre-create the
16+
# You must not turn off basic_auth for the chart, however, you can pre-create the
1717
# secret, if you're using a GitOps tool to create a stable secret
1818
# before installing OpenFaaS Pro via this chart
1919
generateBasicAuth: true

chart/openfaas/values.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ createCRDs: true # Set to false if applying CRDs in another way
99

1010
basic_auth: true # Authentication for core components, no good reason to disable this
1111
rbac: true # Kubernetes RBAC, no good reason to disable this
12-
generateBasicAuth: false # Set to false if applying credentials separately from the chart, otherwise set to true
12+
generateBasicAuth: true # Set to false if applying credentials separately from the chart, otherwise set to true
1313
securityContext: true
1414

1515
exposeServices: true
@@ -18,12 +18,6 @@ async: true # No known reason to disable this, kept for legacy
1818

1919
queueMode: "" # Set to `jetstream` to run the async system backed by NATS JetStream. By default the async system uses NATS Streaming
2020

21-
# Set to true to use legacy / community-edition auto-scaling
22-
# when openfaasPro is set to true to use the original
23-
# auto-scaling logic
24-
# Then set proScaler.enabled=false
25-
ceScaling: false
26-
2721
# create pod security policies for OpenFaaS control plane
2822
# https://kubernetes.io/docs/concepts/policy/pod-security-policy/
2923
psp: false

0 commit comments

Comments
 (0)