forked from openfaas/faas-netes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
faas-idler-dep.yaml
90 lines (88 loc) · 2.6 KB
/
faas-idler-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
82
83
84
85
86
87
88
89
90
{{- $functionNs := default .Release.Namespace .Values.functionNamespace }}
{{- if .Values.openfaasPro }}
{{- if .Values.faasIdler.enabled }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: faas-idler
namespace: {{ .Release.Namespace | quote }}
labels:
app: {{ template "openfaas.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
component: faas-idler
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
spec:
replicas: {{ .Values.faasIdler.replicas }}
selector:
matchLabels:
app: faas-idler
template:
metadata:
annotations:
prometheus.io/scrape: "false"
labels:
app: faas-idler
spec:
containers:
- name: faas-idler
resources:
{{- .Values.faasIdler.resources | toYaml | nindent 12 }}
image: {{ .Values.faasIdler.image }}
imagePullPolicy: {{ .Values.openfaasImagePullPolicy }}
command:
- "/usr/bin/faas-idler"
- -read-only={{ .Values.faasIdler.readOnly }}
- "-license-file=/var/secrets/license/license"
env:
- name: gateway_url
value: "http://gateway.{{ .Release.Namespace }}:8080/"
- name: prometheus_host
value: "prometheus.{{ .Release.Namespace }}"
- name: prometheus_port
value: "9090"
- name: inactivity_duration
value: {{ .Values.faasIdler.inactivityDuration }}
- name: reconcile_interval
value: {{ .Values.faasIdler.reconcileInterval }}
{{- if .Values.faasIdler.writeDebug }}
- name: write_debug
value: {{ .Values.faasIdler.writeDebug }}
{{- end }}
{{- if .Values.faasIdler.printQueries }}
- name: print_queries
value: {{ .Values.faasIdler.printQueries }}
{{- end }}
volumeMounts:
{{- if .Values.basic_auth }}
- name: auth
readOnly: true
mountPath: "/var/secrets/"
{{- end }}
- name: openfaas-license
readOnly: true
mountPath: "/var/secrets/license"
volumes:
{{- if .Values.basic_auth }}
- name: auth
secret:
secretName: basic-auth
{{- end }}
- name: openfaas-license
secret:
secretName: openfaas-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 }}
{{- end }}
{{- end }}