Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenFaaS Pro queue-worker to faas-netes helm chart #851

Merged
merged 2 commits into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 27 additions & 8 deletions chart/openfaas/templates/queueworker-dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,32 @@ spec:
labels:
app: queue-worker
spec:
{{- if .Values.basic_auth }}
volumes:
{{- if .Values.basic_auth }}
- name: auth
secret:
secretName: basic-auth
{{- end }}
{{- if .Values.queueWorkerPro.enabled }}
- name: license
secret:
secretName: openfaas-license
{{- end }}
containers:
- name: queue-worker
resources:
{{- .Values.queueWorker.resources | toYaml | nindent 12 }}
{{- if .Values.queueWorkerPro.enabled }}
image: {{ .Values.queueWorkerPro.image }}
{{- else }}
image: {{ .Values.queueWorker.image }}
{{- end }}
imagePullPolicy: {{ .Values.openfaasImagePullPolicy }}
{{- if .Values.queueWorkerPro.enabled }}
command:
- "/worker"
- "-license-file=/var/secrets/license/license"
{{- end }}
env:
{{- if .Values.nats.external.enabled }}
- name: faas_nats_address
Expand Down Expand Up @@ -62,24 +76,29 @@ spec:
value: "{{ .Values.queueWorker.ackWait }}"
- name: max_inflight
value: "{{ .Values.queueWorker.maxInflight }}"
# OpenFaaS PRO image required
# OpenFaaS PRO license required
- name: "max_retry_attempts"
value: "{{ .Values.queueWorker.maxRetryAttempts }}"
value: "{{ .Values.queueWorkerPro.maxRetryAttempts }}"
- name: "max_retry_wait"
value: "{{ .Values.queueWorker.maxRetryWait }}"
value: "{{ .Values.queueWorkerPro.maxRetryWait }}"
- name: "initial_retry_wait"
value: "{{ .Values.queueWorker.initialRetryWait }}"
value: "{{ .Values.queueWorkerPro.initialRetryWait }}"
- name: "retry_http_codes"
value: "{{ .Values.queueWorker.httpRetryCodes }}"
value: "{{ .Values.queueWorkerPro.httpRetryCodes }}"
{{- if .Values.basic_auth }}
- name: secret_mount_path
value: "/var/secrets"
value: "/var/secrets/gateway"
- name: basic_auth
value: "{{ .Values.basic_auth }}"
volumeMounts:
{{- if .Values.queueWorkerPro.enabled }}
- name: license
readOnly: true
mountPath: "/var/secrets/license"
{{- end }}
- name: auth
readOnly: true
mountPath: "/var/secrets"
mountPath: "/var/secrets/gateway"
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
Expand Down
14 changes: 9 additions & 5 deletions chart/openfaas/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@ operator:
memory: "120Mi"
cpu: "50m"

# Requires openfaas PRO subscription
queueWorkerPro:
image: ghcr.io/openfaas/queue-worker-pro:0.1.0-rc4
enabled: false
maxRetryAttempts: "10"
maxRetryWait: "120s"
initialRetryWait: "10s"
httpRetryCodes: "429,502,500,504,408"

queueWorker:
image: ghcr.io/openfaas/queue-worker:0.12.2
# Control HA of queue-worker
Expand All @@ -128,11 +137,6 @@ queueWorker:
requests:
memory: "120Mi"
cpu: "50m"
# Requires openfaas PRO subscription
maxRetryAttempts: "10"
maxRetryWait: "120s"
initialRetryWait: "10s"
httpRetryCodes: "429,502,500,504,408"

# monitoring and auto-scaling components
# both components
Expand Down