-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathdeployment.yaml
69 lines (69 loc) · 2.19 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
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "litmus.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "litmus.operatorLabels" . | indent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "litmus.operatorSelectors" . | indent 6 }}
template:
metadata:
labels:
{{- include "litmus.operatorLabels" . | indent 8 }}
spec:
serviceAccountName: {{ include "litmus.fullname" . }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- end }}
containers:
- name: {{ .Values.operatorName }}
image: "{{ .Values.operator.image.repository }}:{{ .Values.operator.image.tag }}"
imagePullPolicy: {{ .Values.operator.image.pullPolicy }}
command:
- chaos-operator
args:
- -leader-elect=true
env:
- name: CHAOS_RUNNER_IMAGE
value: "{{ .Values.runner.image.repository }}:{{ .Values.runner.image.tag }}"
{{ if or (eq .Values.operatorMode "namespaced") ( eq .Values.operatorMode "admin") }}
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{ else }}
- name: WATCH_NAMESPACE
value:
{{ end }}
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "chaos-operator"
{{- if .Values.policies.monitoring.disabled }}
- name: ANALYTICS
value: "FALSE"
{{- end }}
ports:
- name: http
containerPort: 80
protocol: TCP
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 }}