-
Notifications
You must be signed in to change notification settings - Fork 490
Expand file tree
/
Copy pathdeployment.yaml
More file actions
114 lines (110 loc) · 3.87 KB
/
deployment.yaml
File metadata and controls
114 lines (110 loc) · 3.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: {{ template "queue-worker.name" . }}
component: queue-worker
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
name: {{ template "queue-worker.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
spec:
replicas: {{ .Values.replicas }}
selector:
matchLabels:
app: {{ template "queue-worker.name" . }}
component: queue-worker
template:
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8081"
labels:
app: {{ template "queue-worker.name" . }}
component: queue-worker
release: {{ .Release.Name }}
spec:
volumes:
- name: license
secret:
secretName: openfaas-license
containers:
- name: queue-worker
resources:
{{- .Values.resources | toYaml | nindent 10 }}
image: {{ .Values.image }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
command:
- "jetstream-queue-worker"
- "-license-file=/var/secrets/license/license"
env:
- name: "nats_host"
value: "{{ .Values.nats.host }}"
- name: "nats_port"
value: "{{ .Values.nats.port }}"
- name: "nats_stream"
value: "{{ .Values.nats.stream.name }}"
- name: "nats_durable"
value: "{{ .Values.nats.consumer.durableName }}"
- name: "queue_name"
value: "{{ .Values.queueName }}"
- name: "queue_partitions"
value: "{{ .Values.queuePartitions }}"
- name: "filter_partition"
value: "{{ .Values.partition }}"
- name: "max_inflight"
value: "{{ .Values.maxInflight }}"
- name: "scaling_mode"
value: "{{ .Values.mode }}"
{{- if .Values.consumer.inactiveThreshold }}
- name: "consumer_inactive_threshold"
value: "{{ .Values.consumer.inactiveThreshold }}"
{{- end }}
{{- if .Values.consumer.pullMaxMessages }}
- name: "consumer_pull_max_messages"
value: "{{ .Values.consumer.pullMaxMessages }}"
{{- end }}
- name: "gateway_url"
value: "{{ .Values.gateway.host }}:{{ .Values.gateway.port }}"
- name: "tls_insecure"
value: "{{ .Values.insecureTLS }}"
- name: "debug"
value: "{{ .Values.logs.debug }}"
- name: "log_encoding"
value: "{{ .Values.logs.format }}"
- name: "nats_stream_replicas"
value: "{{ .Values.nats.stream.replicas }}"
- name: "ack_wait"
value: "{{ .Values.nats.consumer.ackWait }}"
- name: "limiter_enabled"
value: "{{ .Values.adaptiveConcurrency }}"
- name: "upstream_timeout"
value: "{{ .Values.upstreamTimeout }}"
- name: "max_retry_attempts"
value: "{{ .Values.maxRetryAttempts }}"
- name: "max_retry_wait"
value: "{{ .Values.maxRetryWait }}"
- name: "initial_retry_wait"
value: "{{ .Values.initialRetryWait }}"
- name: "retry_http_codes"
value: "{{ .Values.httpRetryCodes }}"
- name: "backoff"
value: "{{ .Values.backoff }}"
volumeMounts:
- name: license
readOnly: true
mountPath: "/var/secrets/license"
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}