Skip to content

Commit 0536fb2

Browse files
committed
Support structured logging config for faas-netes (Pro/Enterprise)
Support configuration for debug level logging and JSON logging for the faas-netes controller (Pro/Enterprise). Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
1 parent 873c09f commit 0536fb2

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

chart/openfaas/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,8 @@ yaml) |
490490
| `faasnetes.resources` | Resource limits and requests for faas-netes container | See [values.yaml](./values.yaml) |
491491
| `faasnetes.writeTimeout` | Write timeout for the faas-netes API | `""` (defaults to gateway.writeTimeout) |
492492
| `faasnetesPro.image` | Container image used for faas-netes when `openfaasPro=true` | See [values.yaml](./values.yaml) |
493+
| `faasnetesPro.logs.format` | Set the log format, supports `console` or `json` | `console` |
494+
| `faasnetesPro.logs.debug` | Print debug logs | `false` |
493495
| `operator.create` | Use the OpenFaaS operator CRD controller, default uses faas-netes as the Kubernetes controller | `false` |
494496
| `operator.image` | Container image used for the openfaas-operator | See [values.yaml](./values.yaml) |
495497
| `operator.resources` | Resource limits and requests for openfaas-operator containers | See [values.yaml](./values.yaml) |

chart/openfaas/templates/gateway-dep.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,12 @@ spec:
434434
- name: auditing_http_verbs
435435
value: "{{ .Values.eventSubscription.auditing.httpVerbs }}"
436436
{{- end}}
437+
{{- if .Values.faasnetesPro.logs}}
438+
- name: "debug"
439+
value: "{{ .Values.faasnetesPro.logs.debug }}"
440+
- name: "log_encoding"
441+
value: "{{ .Values.faasnetesPro.logs.format }}"
442+
{{- end }}
437443
volumeMounts:
438444
{{- if .Values.iam.enabled }}
439445
- name: issuer-key

chart/openfaas/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ operator:
172172

173173
faasnetesPro:
174174
image: ghcr.io/openfaasltd/faas-netes:0.5.14
175+
logs:
176+
debug: false
177+
format: "console"
175178

176179
# For the Community Edition
177180
faasnetes:

0 commit comments

Comments
 (0)