-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path_matcher.tpl
80 lines (79 loc) · 2.77 KB
/
_matcher.tpl
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
{{/*
Definition of matcher deployment manifest. Will either be used by tenant operator or directly
*/}}
{{- define "smartface.matcherDefinition" -}}
{{- $name := include "smartface.matcher.name" . -}}
{{- $selectorLabels := include "smartface.matcher.selectorLabels" . -}}
apiVersion: "apps/v1"
kind: "Deployment"
metadata:
name: {{ $name | quote }}
labels:
{{- include "smartface.matcher.labels" . | nindent 4 }}
annotations:
{{- with .Values.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.matcher.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.matcher.replicas }}
{{- if .Values.revisionHistoryLimit }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- end }}
{{- if .Values.updateStrategy }}
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
{{- end }}
selector:
matchLabels:
{{- $selectorLabels | nindent 6 }}
template:
metadata:
annotations:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.matcher.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- $selectorLabels | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.matcher.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ .Values.serviceAccount.name | quote }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
topologySpreadConstraints:
{{- include "smartface.topologySpread" (dict "selectorLabels" $selectorLabels ) | nindent 8 }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Values.matcher.name | quote }}
image: {{ include "smartface.image" (dict "local" .Values.matcher.image "global" .Values.global.image "defaultVersion" .Chart.AppVersion) }}
imagePullPolicy: {{ .Values.matcher.image.pullPolicy }}
env:
{{- include "smartface.commonEnv" . | nindent 8 }}
{{- include "smartface.rmqConfig" . | nindent 8 }}
{{- include "smartface.dbConfig" . | nindent 8 }}
resources:
{{- toYaml .Values.matcher.resources | nindent 10 }}
volumeMounts:
{{- include "smartface.licVolumeMount" . | nindent 8 }}
volumes:
{{- include "smartface.licVolume" . | nindent 8 }}
{{- with .Values.matcher.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.matcher.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}