-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path2-deployment.yaml
76 lines (76 loc) · 2.37 KB
/
2-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
66
67
68
69
70
71
72
73
74
75
76
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "fleet-telemetry.fullname" . }}
labels:
role: api
service: fleet-telemetry
{{- include "fleet-telemetry.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicas }}
selector:
matchLabels:
role: api
service: fleet-telemetry
{{- include "fleet-telemetry.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
role: api
service: fleet-telemetry
{{- include "fleet-telemetry.selectorLabels" . | nindent 8 }}
spec:
containers:
- command:
- /fleet-telemetry
- -config=/etc/fleet-telemetry/config.json
env:
- name: KUBERNETES_CLUSTER_DOMAIN
value: {{ quote .Values.kubernetesClusterDomain }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}
livenessProbe:
failureThreshold: 5
httpGet:
path: /metrics
port: {{ .Values.config.metrics.port }}
scheme: HTTP
initialDelaySeconds: 5
timeoutSeconds: 10
readinessProbe:
failureThreshold: 5
httpGet:
path: /status
port: {{ .Values.config.status.port }}
scheme: HTTP
initialDelaySeconds: 5
timeoutSeconds: 10
name: fleet-telemetry
ports:
- containerPort: {{ .Values.config.profile.port }}
name: profile
protocol: TCP
- containerPort: {{ .Values.config.port }}
name: https
protocol: TCP
- containerPort: {{ .Values.config.metrics.port }}
name: metrics
protocol: TCP
resources: {{- toYaml .Values.resources | nindent 10 }}
volumeMounts:
- mountPath: /etc/fleet-telemetry/
name: config
- mountPath: /etc/certs/server
name: server-certs
nodeSelector: {{- toYaml .Values.nodeSelector | nindent 8 }}
tolerations: {{- toYaml .Values.tolerations | nindent 8 }}
volumes:
- name: config
projected:
sources:
- configMap:
name: {{ include "fleet-telemetry.fullname" . }}
- name: server-certs
projected:
sources:
- secret:
name: {{ .Values.tlsSecret.name | default (printf "%s" (include "fleet-telemetry.fullname" .)) }}