forked from liqotech/liqo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathliqo-proxy-deployment.yaml
65 lines (62 loc) · 2.38 KB
/
liqo-proxy-deployment.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
{{- $proxyConfig := (merge (dict "name" "proxy" "module" "networking" "version" .Values.proxy.image.version) .) -}}
{{- if .Values.proxy.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
{{- include "liqo.labels" $proxyConfig | nindent 4 }}
name: {{ include "liqo.prefixedName" $proxyConfig }}
spec:
replicas: {{ .Values.proxy.replicas }}
selector:
matchLabels:
{{- include "liqo.selectorLabels" $proxyConfig | nindent 6 }}
template:
metadata:
{{- if .Values.proxy.pod.annotations }}
annotations:
{{- toYaml .Values.proxy.pod.annotations | nindent 8 }}
{{- end }}
labels:
{{- include "liqo.labels" $proxyConfig | nindent 8 }}
{{- if .Values.proxy.pod.labels }}
{{- toYaml .Values.proxy.pod.labels | nindent 8 }}
{{- end }}
spec:
securityContext:
{{- include "liqo.podSecurityContext" . | nindent 8 }}
containers:
- image: {{ .Values.proxy.image.name }}{{ include "liqo.suffix" $proxyConfig }}:{{ include "liqo.version" $proxyConfig }}
imagePullPolicy: {{ .Values.pullPolicy }}
name: {{ $proxyConfig.name }}
securityContext:
{{- include "liqo.containerSecurityContext" . | nindent 12 }}
ports:
- containerPort: {{ .Values.proxy.config.listeningPort }}
resources: {{- toYaml .Values.proxy.pod.resources | nindent 12 }}
args:
- --port={{ .Values.proxy.config.listeningPort }}
{{- if or .Values.common.extraArgs .Values.proxy.pod.extraArgs }}
{{- if .Values.common.extraArgs }}
{{- toYaml .Values.common.extraArgs | nindent 10 }}
{{- end }}
{{- if .Values.proxy.pod.extraArgs }}
{{- toYaml .Values.proxy.pod.extraArgs | nindent 10 }}
{{- end }}
{{- end }}
{{- if ((.Values.common).nodeSelector) }}
nodeSelector:
{{- toYaml .Values.common.nodeSelector | nindent 8 }}
{{- end }}
{{- if ((.Values.common).tolerations) }}
tolerations:
{{- toYaml .Values.common.tolerations | nindent 8 }}
{{- end }}
{{- if ((.Values.common).affinity) }}
affinity:
{{- toYaml .Values.common.affinity | nindent 8 }}
{{- end }}
{{- if .Values.proxy.pod.priorityClassName }}
priorityClassName: {{ .Values.proxy.pod.priorityClassName }}
{{- end }}
{{- end }}