Skip to content

Commit

Permalink
Support structured logging config for faas-netes (Pro/Enterprise)
Browse files Browse the repository at this point in the history
Support configuration for debug level logging and JSON logging for the
faas-netes controller (Pro/Enterprise).

Signed-off-by: Han Verstraete (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
welteki authored and alexellis committed Feb 7, 2024
1 parent 873c09f commit 44aad06
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chart/openfaas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ yaml) |
| `faasnetes.resources` | Resource limits and requests for faas-netes container | See [values.yaml](./values.yaml) |
| `faasnetes.writeTimeout` | Write timeout for the faas-netes API | `""` (defaults to gateway.writeTimeout) |
| `faasnetesPro.image` | Container image used for faas-netes when `openfaasPro=true` | See [values.yaml](./values.yaml) |
| `faasnetesPro.logs.format` | Set the log format, supports `console` or `json` | `console` |
| `faasnetesPro.logs.debug` | Print debug logs | `false` |
| `operator.create` | Use the OpenFaaS operator CRD controller, default uses faas-netes as the Kubernetes controller | `false` |
| `operator.image` | Container image used for the openfaas-operator | See [values.yaml](./values.yaml) |
| `operator.resources` | Resource limits and requests for openfaas-operator containers | See [values.yaml](./values.yaml) |
Expand Down
6 changes: 6 additions & 0 deletions chart/openfaas/templates/gateway-dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,12 @@ spec:
- name: auditing_http_verbs
value: "{{ .Values.eventSubscription.auditing.httpVerbs }}"
{{- end}}
{{- if .Values.faasnetesPro.logs}}
- name: "debug"
value: "{{ .Values.faasnetesPro.logs.debug }}"
- name: "log_encoding"
value: "{{ .Values.faasnetesPro.logs.format }}"
{{- end }}
volumeMounts:
{{- if .Values.iam.enabled }}
- name: issuer-key
Expand Down
3 changes: 3 additions & 0 deletions chart/openfaas/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ operator:

faasnetesPro:
image: ghcr.io/openfaasltd/faas-netes:0.5.14
logs:
debug: false
format: "console"

# For the Community Edition
faasnetes:
Expand Down

0 comments on commit 44aad06

Please sign in to comment.