-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
admin-api-dep.yaml
131 lines (131 loc) · 4.81 KB
/
admin-api-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 .Values.enterprise.enabled -}}
{{ $dict := dict "ctx" . "component" "admin-api" "memberlist" true }}
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
{{- toYaml .Values.adminApi.annotations | nindent 4 }}
labels:
{{- include "tempo.labels" $dict | nindent 4 }}
name: {{ include "tempo.resourceName" $dict }}
namespace: {{ .Release.Namespace | quote }}
spec:
replicas: {{ .Values.adminApi.replicas }}
selector:
matchLabels:
{{- include "tempo.selectorLabels" $dict | nindent 6 }}
strategy:
{{- toYaml .Values.adminApi.strategy | nindent 4 }}
template:
metadata:
labels:
{{- include "tempo.podLabels" $dict | nindent 8 }}
{{- with .Values.adminApi.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{- include "tempo.podAnnotations" $dict | nindent 8 }}
namespace: {{ .Release.Namespace | quote }}
spec:
serviceAccountName: {{ template "tempo.serviceAccountName" . }}
{{- if .Values.adminApi.priorityClassName }}
priorityClassName: {{ .Values.adminApi.priorityClassName }}
{{- end }}
securityContext:
{{- toYaml .Values.adminApi.securityContext | nindent 8 }}
initContainers:
{{- with .Values.adminApi.initContainers }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "tempo.adminApiImagePullSecrets" . | nindent 6 -}}
{{- with .Values.adminApi.hostAliases }}
hostAliases:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: admin-api
image: "{{ include "tempo.imageReference" $dict }}"
imagePullPolicy: {{ .Values.tempo.image.pullPolicy }}
args:
- "-target=admin-api"
- "-config.expand-env=true"
- "-config.file=/conf/tempo.yaml"
{{- range $key, $value := .Values.adminApi.extraArgs }}
- "-{{ $key }}={{ $value }}"
{{- end }}
volumeMounts:
- mountPath: /conf
name: config
- name: license
mountPath: /license
- name: storage
mountPath: "/data"
subPath: {{ .Values.adminApi.persistence.subPath }}
{{- if .Values.adminApi.extraVolumeMounts }}
{{ toYaml .Values.adminApi.extraVolumeMounts | nindent 12}}
{{- end }}
ports:
- name: http-metrics
containerPort: {{ include "tempo.serverHttpListenPort" . }}
protocol: TCP
- name: grpc
containerPort: {{ include "tempo.serverGrpcListenPort" . }}
protocol: TCP
- name: memberlist
containerPort: {{ include "tempo.memberlistBindPort" . }}
protocol: TCP
livenessProbe:
{{- toYaml .Values.adminApi.livenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .Values.adminApi.readinessProbe | nindent 12 }}
resources:
{{- toYaml .Values.adminApi.resources | nindent 12 }}
securityContext:
{{- toYaml .Values.adminApi.containerSecurityContext | nindent 12 }}
env:
{{- with .Values.global.extraEnv }}
{{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.adminApi.env }}
{{ toYaml . | nindent 12 }}
{{- end }}
envFrom:
{{- with .Values.global.extraEnvFrom }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.adminApi.extraEnvFrom }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.adminApi.extraContainers }}
{{ toYaml . | nindent 8 }}
{{- end }}
nodeSelector:
{{- toYaml .Values.adminApi.nodeSelector | nindent 8 }}
{{- if semverCompare ">= 1.19-0" .Capabilities.KubeVersion.Version }}
{{- with .Values.adminApi.topologySpreadConstraints }}
topologySpreadConstraints:
{{- tpl . $ | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.adminApi.affinity }}
affinity:
{{- tpl . $ | nindent 8 }}
{{- end }}
tolerations:
{{- toYaml .Values.adminApi.tolerations | nindent 8 }}
terminationGracePeriodSeconds: {{ .Values.adminApi.terminationGracePeriodSeconds }}
volumes:
- name: config
{{- include "tempo.configVolume" . | nindent 10 }}
- name: runtime-config
configMap:
name: {{ template "tempo.fullname" . }}-runtime
{{- if .Values.adminApi.extraVolumes }}
{{ toYaml .Values.adminApi.extraVolumes | nindent 8}}
{{- end }}
- name: license
secret:
secretName: {{ tpl .Values.license.secretName . }}
- name: storage
emptyDir: {}
{{- end -}}