forked from openfaas/faas-netes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nats-dep.yaml
81 lines (81 loc) · 2.08 KB
/
nats-dep.yaml
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
{{- if and .Values.async (not .Values.nats.external.enabled) }}
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: {{ template "openfaas.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
component: nats
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: nats
namespace: {{ .Release.Namespace | quote }}
spec:
replicas: 1
selector:
matchLabels:
app: nats
template:
metadata:
annotations:
prometheus.io/scrape: {{ .Values.nats.metrics.enabled | quote }}
{{- if .Values.nats.metrics.enabled }}
prometheus.io/port: "7777"
{{- end }}
labels:
app: nats
spec:
containers:
- name: nats
resources:
{{- .Values.nats.resources | toYaml | nindent 12 }}
image: {{ .Values.nats.image }}
imagePullPolicy: {{ .Values.openfaasImagePullPolicy }}
ports:
- containerPort: 4222
protocol: TCP
{{- if .Values.nats.enableMonitoring }}
- containerPort: 8222
protocol: TCP
{{- end }}
command: ["/nats-streaming-server"]
args:
- --store
- memory
- --cluster_id
- faas-cluster
{{- if or .Values.nats.enableMonitoring .Values.nats.metrics.enabled }}
- -m
- "8222"
{{- end }}
{{- if .Values.nats.metrics.enabled }}
- name: metrics
image: {{ .Values.nats.metrics.image }}
imagePullPolicy: {{ .Values.openfaasImagePullPolicy }}
ports:
- containerPort: 7777
protocol: TCP
args:
- -port
- "7777"
- -connz
- -routez
- -subz
- -varz
- -channelz
- -serverz
- http://localhost:8222
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- end }}