-
Notifications
You must be signed in to change notification settings - Fork 45
/
deployment.yaml
70 lines (70 loc) · 2.68 KB
/
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "k8s-pod-restart-info-collector.fullname" . }}
labels:
{{- include "k8s-pod-restart-info-collector.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "k8s-pod-restart-info-collector.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "k8s-pod-restart-info-collector.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "k8s-pod-restart-info-collector.fullname" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: collector
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["/k8s-pod-restart-info-collector"]
env:
- name: CLUSTER_NAME
value: {{ required "service name is required" .Values.clusterName | quote}}
- name: SLACK_CHANNEL
value: {{ .Values.slackChannel | quote}}
- name: SLACK_USERNAME
value: {{ .Values.slackUsername | quote}}
- name: MUTE_SECONDS
value: {{ .Values.muteSeconds | quote}}
- name: IGNORE_RESTART_COUNT
value: {{ .Values.ignoreRestartCount | quote}}
- name: IGNORED_NAMESPACES
value: {{ .Values.ignoredNamespaces | quote}}
- name: WATCHED_NAMESPACES
value: {{ .Values.watchedNamespaces | quote}}
- name: WATCHED_POD_NAME_PREFIXES
value: {{ .Values.watchedPodNamePrefixes | quote}}
- name: IGNORED_POD_NAME_PREFIXES
value: {{ .Values.ignoredPodNamePrefixes | quote}}
- name: IGNORE_RESTARTS_WITH_EXIT_CODE_ZERO
value: {{ .Values.ignoreRestartsWithExitCodeZero | quote}}
- name: SLACK_WEBHOOK_URL
valueFrom:
{{- include "k8s-pod-restart-info-collector.SlackWebhookUrlSecret" . | indent 14 }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}