-
Notifications
You must be signed in to change notification settings - Fork 167
/
Copy pathingester-dep.yaml
131 lines (131 loc) · 5.1 KB
/
ingester-dep.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
{{- if and (not .Values.ingester.statefulSet.enabled) .Values.ingester.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "cortex.ingesterFullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "cortex.ingesterLabels" . | nindent 4 }}
app.kubernetes.io/part-of: memberlist
annotations:
{{- toYaml .Values.ingester.annotations | nindent 4 }}
spec:
{{- if not .Values.ingester.autoscaling.enabled }}
replicas: {{ .Values.ingester.replicas }}
{{- end }}
selector:
matchLabels:
{{- include "cortex.ingesterSelectorLabels" . | nindent 6 }}
strategy:
{{- toYaml .Values.ingester.strategy | nindent 4 }}
template:
metadata:
labels:
{{- include "cortex.ingesterLabels" . | nindent 8 }}
app.kubernetes.io/part-of: memberlist
{{- with .Values.ingester.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
checksum/config: {{ include "cortex.configChecksum" . }}
{{- with .Values.ingester.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ .Values.ingester.serviceAccount.name | default (include "cortex.serviceAccountName" . ) }}
{{- if .Values.ingester.priorityClassName }}
priorityClassName: {{ .Values.ingester.priorityClassName }}
{{- end }}
{{- if .Values.ingester.securityContext.enabled }}
securityContext: {{- omit .Values.ingester.securityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
initContainers:
{{- toYaml .Values.ingester.initContainers | nindent 8 }}
{{- if .Values.image.pullSecrets }}
imagePullSecrets:
{{- range .Values.image.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
containers:
- name: ingester
image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- "-target=ingester"
- "-config.file=/etc/cortex/cortex.yaml"
{{- include "cortex.memcached" . | nindent 12}}
{{- range $key, $value := .Values.ingester.extraArgs }}
- "-{{ $key }}={{ $value }}"
{{- end }}
volumeMounts:
{{- if .Values.ingester.extraVolumeMounts }}
{{- toYaml .Values.ingester.extraVolumeMounts | nindent 12}}
{{- end }}
- name: config
mountPath: /etc/cortex
- name: runtime-config
mountPath: /etc/cortex-runtime-config
- name: storage
mountPath: "/data"
{{- with .Values.ingester.persistentVolume.subPath }}
subPath: {{ . }}
{{- end }}
ports:
- name: http-metrics
containerPort: {{ .Values.config.server.http_listen_port }}
protocol: TCP
- name: grpc
containerPort: {{ .Values.config.server.grpc_listen_port }}
protocol: TCP
- name: gossip
containerPort: {{ .Values.config.memberlist.bind_port }}
protocol: TCP
{{- if .Values.ingester.startupProbe }}
startupProbe:
{{- toYaml .Values.ingester.startupProbe | nindent 12 }}
{{- end }}
{{- if .Values.ingester.livenessProbe }}
livenessProbe:
{{- toYaml .Values.ingester.livenessProbe | nindent 12 }}
{{- end }}
readinessProbe:
{{- toYaml .Values.ingester.readinessProbe | nindent 12 }}
resources:
{{- toYaml .Values.ingester.resources | nindent 12 }}
{{- if .Values.ingester.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.ingester.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
env:
{{- if .Values.ingester.env }}
{{ toYaml .Values.ingester.env | nindent 12 }}
{{- end }}
{{- with .Values.ingester.lifecycle }}
lifecycle:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.ingester.extraContainers }}
{{- toYaml . | nindent 8 }}
{{- end }}
nodeSelector:
{{- toYaml .Values.ingester.nodeSelector | nindent 8 }}
{{- if .Values.ingester.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml .Values.ingester.topologySpreadConstraints | nindent 8}}
{{- end }}
affinity:
{{- toYaml .Values.ingester.affinity | nindent 8 }}
tolerations:
{{- toYaml .Values.ingester.tolerations | nindent 8 }}
terminationGracePeriodSeconds: {{ .Values.ingester.terminationGracePeriodSeconds }}
volumes:
{{- include "cortex.configVolume" . | nindent 8 }}
- name: runtime-config
configMap:
name: {{ template "cortex.fullname" . }}-runtime-config
- name: storage
emptyDir: {}
{{- if .Values.ingester.extraVolumes }}
{{- toYaml .Values.ingester.extraVolumes | nindent 8}}
{{- end }}
{{- end -}}