-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
Copy pathstatefulset.yaml
198 lines (198 loc) · 6.73 KB
/
statefulset.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ template "tempo.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "tempo.labels" . | nindent 4 }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicas }}
{{- if .Values.revisionHistoryLimit }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- end }}
{{- if and (semverCompare ">= 1.23-0" .Capabilities.KubeVersion.Version) (.Values.persistence.enableStatefulSetAutoDeletePVC) (.Values.persistence.enabled) }}
persistentVolumeClaimRetentionPolicy:
whenDeleted: Delete
whenScaled: Delete
{{- end }}
selector:
matchLabels:
{{- include "tempo.selectorLabels" . | nindent 6 }}
serviceName: {{ template "tempo.fullname" . }}-headless
template:
metadata:
labels:
{{- include "tempo.selectorLabels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap-tempo.yaml") . | sha256sum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "tempo.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- with .Values.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- if or .Values.tempo.pullSecrets ( and .Values.tempoQuery.enabled .Values.tempoQuery.pullSecrets ) }}
imagePullSecrets:
{{- range .Values.tempo.pullSecrets }}
- name: {{ . }}
{{- end}}
{{- if and .Values.tempoQuery.enabled .Values.tempoQuery.pullSecrets }}
{{- range .Values.tempoQuery.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
{{- end }}
containers:
- args:
- -config.file=/conf/tempo.yaml
- -mem-ballast-size-mbs={{ .Values.tempo.memBallastSizeMbs }}
{{- range $key, $value := .Values.tempo.extraArgs }}
- "-{{ $key }}{{ if $value }}={{ $value }}{{ end }}"
{{- end }}
image: {{ .Values.tempo.repository }}:{{ .Values.tempo.tag | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.tempo.pullPolicy }}
name: tempo
ports:
- containerPort: 3100
name: prom-metrics
- containerPort: 6831
name: jaeger-thrift-c
protocol: UDP
- containerPort: 6832
name: jaeger-thrift-b
protocol: UDP
- containerPort: 14268
name: jaeger-thrift-h
- containerPort: 14250
name: jaeger-grpc
- containerPort: 9411
name: zipkin
- containerPort: 55680
name: otlp-legacy
- containerPort: 4317
name: otlp-grpc
- containerPort: 55681
name: otlp-httplegacy
- containerPort: 4318
name: otlp-http
- containerPort: 55678
name: opencensus
resources:
{{- toYaml .Values.tempo.resources | nindent 10 }}
{{- with .Values.tempo.securityContext }}
securityContext:
{{- toYaml . | nindent 10 }}
{{- end }}
env:
{{- with .Values.tempo.extraEnv }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.tempo.extraEnvFrom }}
envFrom:
{{- toYaml . | nindent 10 }}
{{- end }}
volumeMounts:
{{- if .Values.tempo.extraVolumeMounts -}}
{{ toYaml .Values.tempo.extraVolumeMounts | nindent 8 }}
{{- end }}
- mountPath: /conf
name: tempo-conf
{{- if .Values.persistence.enabled }}
- mountPath: /var/tempo
name: storage
{{- end }}
{{- if .Values.tempo.metricsGenerator.enabled }}
- mountPath: /tmp
name: tmp
{{- end }}
{{- if .Values.tempoQuery.enabled }}
- args:
- --query.base-path=/
- --grpc-storage-plugin.configuration-file=/conf/tempo-query.yaml
{{- range $key, $value := .Values.tempoQuery.extraArgs }}
- "-{{ $key }}{{ if $value }}={{ $value }}{{ end }}"
{{- end }}
image: {{ .Values.tempoQuery.repository }}:{{ .Values.tempoQuery.tag | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.tempoQuery.pullPolicy }}
name: tempo-query
ports:
- containerPort: 16686
name: jaeger-ui
- containerPort: 16687
name: jaeger-metrics
env:
{{- if .Values.tempoQuery.extraEnv }}
{{- toYaml .Values.tempoQuery.extraEnv | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.tempoQuery.resources | nindent 10 }}
{{- with .Values.tempoQuery.securityContext }}
securityContext:
{{- toYaml . | nindent 10 }}
{{- end }}
volumeMounts:
{{- if .Values.tempoQuery.extraVolumeMounts -}}
{{ toYaml .Values.tempoQuery.extraVolumeMounts | nindent 8 }}
{{- end }}
- mountPath: /conf
name: tempo-query-conf
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
{{- if .Values.extraVolumes -}}
{{ toYaml .Values.extraVolumes | nindent 6 }}
{{- end }}
{{- if .Values.tempoQuery.enabled }}
- configMap:
name: {{ template "tempo.name" . }}-query
name: tempo-query-conf
{{- end }}
- configMap:
name: {{ template "tempo.name" . }}
name: tempo-conf
{{- if .Values.tempo.metricsGenerator.enabled }}
- name: tmp
emptyDir: {}
{{- end }}
updateStrategy:
type: {{- toYaml .Values.tempo.updateStrategy | nindent 6 }}
{{- if .Values.persistence.enabled }}
volumeClaimTemplates:
- metadata:
name: storage
annotations: {{- toYaml .Values.persistence.annotations | nindent 10 }}
spec:
accessModes: {{- toYaml .Values.persistence.accessModes | nindent 10 }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
storageClassName: {{ .Values.persistence.storageClassName }}
{{- if .Values.persistence.selector }}
selector: {{- toYaml .Values.persistence.selector | nindent 10 }}
{{- end }}
{{- end }}