Skip to content

Commit

Permalink
Enable support for pprof for operator
Browse files Browse the repository at this point in the history
Pprof is already present in the operator, but required manual
edits. This commit makes it available via values.yaml for
easy use.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Oct 17, 2023
1 parent 98581dc commit 291ac3e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions chart/openfaas/templates/gateway-dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ spec:
- name: leader_election
value: "true"
{{- end }}
{{- if eq (or .Values.operator.pprof false) true }}
- name: pprof
value: {{ .Values.operator.pprof | quote }}
{{- end }}
{{- if .Values.iam.enabled }}
- name: issuer_key_path
value: "/var/secrets/issuer-key/issuer.key"
Expand Down
8 changes: 7 additions & 1 deletion chart/openfaas/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,18 @@ operator:
create: false
# Unnecessary when running a single replica of the gateway
leaderElection:
enabled: true
enabled: false
reconcileWorkers: 2
resources:
requests:
memory: "120Mi"
cpu: "50m"
# When set to true, pprof will be enabled, and the
# service "faas-provider" will gain an extra port to
# expose the pprof endpoint, this cannot be used in production
# since it may bypass authentication, and should only be used
# for debugging purposes
pprof: false

# For OpenFaaS for Enterprises, these numbers can be set higher,
# if experiencing rate limiting due to a large number of functions
Expand Down

0 comments on commit 291ac3e

Please sign in to comment.