-
Notifications
You must be signed in to change notification settings - Fork 184
/
deployment.yaml
136 lines (136 loc) · 5.88 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
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
{{ $tracesGateway := .Values.tracesGateway }}
{{ $tracesEnabled := .Values.sumologic.traces.enabled }}
{{- if and $tracesEnabled $tracesGateway.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "sumologic.metadata.name.tracesgateway.deployment" . }}
namespace: {{ template "sumologic.namespace" . }}
labels:
app: {{ template "sumologic.labels.app.tracesgateway.pod" . }}
component: {{ template "sumologic.labels.app.tracesgateway.component" . }}
{{- include "sumologic.labels.common" . | nindent 4 }}
spec:
minReadySeconds: 5
{{- if eq (include "tracesGateway.autoscaling.enabled" .) "false" }}
replicas: {{ $tracesGateway.deployment.replicas }}
{{- end }}
selector:
matchLabels:
app: {{ template "sumologic.labels.app.tracesgateway.pod" . }}
component: {{ template "sumologic.labels.app.tracesgateway.component" . }}
{{- if .Values.sumologic.podLabels }}
{{ toYaml .Values.sumologic.podLabels | indent 6 }}
{{- end }}
{{- if $tracesGateway.deployment.podLabels }}
{{ toYaml $tracesGateway.deployment.podLabels | indent 6 }}
{{- end }}
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/instrumentation/traces-gateway/configmap.yaml") . | sha256sum }}
{{- if .Values.sumologic.podAnnotations }}
{{ toYaml .Values.sumologic.podAnnotations | indent 8 }}
{{- end }}
{{- if $tracesGateway.deployment.podAnnotations }}
{{ toYaml $tracesGateway.deployment.podAnnotations | indent 8 }}
{{- end }}
labels:
app: {{ template "sumologic.labels.app.tracesgateway.pod" . }}
component: {{ template "sumologic.labels.app.tracesgateway.component" . }}
{{- include "sumologic.labels.common" . | nindent 8 }}
{{- if .Values.sumologic.podLabels }}
{{ toYaml .Values.sumologic.podLabels | indent 8 }}
{{- end }}
{{- if $tracesGateway.deployment.podLabels }}
{{ toYaml $tracesGateway.deployment.podLabels | indent 8 }}
{{- end }}
spec:
{{- if $.Values.sumologic.pullSecrets }}
imagePullSecrets:
{{- range $.Values.sumologic.pullSecrets }}
- name: {{ .name }}
{{- end }}
{{- end }}
serviceAccountName: {{ template "sumologic.metadata.name.roles.serviceaccount" . }}
{{- if not (empty (include "tracesGateway.deployment.nodeSelector" .)) }}
nodeSelector:
{{ include "tracesGateway.deployment.nodeSelector" . | indent 8 }}
{{- end }}
{{- if not (empty (include "tracesGateway.deployment.tolerations" .)) }}
tolerations:
{{ include "tracesGateway.deployment.tolerations" . | indent 8 }}
{{- end }}
{{- if $tracesGateway.deployment.priorityClassName }}
priorityClassName: {{ $tracesGateway.deployment.priorityClassName | quote }}
{{- end }}
# Otel agent quits if the load balancing backend (collector/samples) is
# not ready during first connect attempt. Restart policy `Always` guarantees that
# the agent will have a chance to retry when collector is ready.
restartPolicy: Always
containers:
- name: otelcol
image: {{ template "sumologic.tracesgateway.image" . }}
imagePullPolicy: {{ $tracesGateway.deployment.image.pullPolicy }}
args:
- "--config=/conf/traces.gateway.conf.yaml"
env:
- name: GOGC
value: "80"
{{- $ctx := .Values -}}
{{- include "kubernetes.sources.envs" (dict "Context" $ctx "Type" "traces") | nindent 8 -}}
{{- include "kubernetes.sources.env" (dict "Context" $ctx "Type" "metrics" "Name" "default" ) | nindent 8 }}
{{- include "proxy-env-variables" . | nindent 8 -}}
{{- if $tracesGateway.deployment.extraEnvVars }}
{{- toYaml $tracesGateway.deployment.extraEnvVars | nindent 8 }}
{{- end }}
resources:
{{- toYaml $tracesGateway.deployment.resources | nindent 10 }}
ports:
- name: pprof
containerPort: 1777
protocol: TCP
- containerPort: 5778 # Default endpoint for Jaeger Sampling.
- containerPort: 6831 # Default endpoint for Jaeger Thrift Compact receiver.
protocol: UDP
- containerPort: 6832 # Default endpoint for Jaeger Thrift Binary receiver.
protocol: UDP
- containerPort: 8888 # Default endpoint for querying metrics.
- containerPort: 9411 # Default endpoint for Zipkin receiver.
- containerPort: 14250 # Default endpoint for Jaeger gRPC receiver.
- containerPort: 14267 # Default endpoint for Jaeger TChannel receiver.
- containerPort: 14268 # Default endpoint for Jaeger HTTP receiver.
- containerPort: 55678 # Default endpoint for Opencensus receiver.
- containerPort: 4317 # Default endpoint for OTLP receiver.
- containerPort: 4318 # Default endpoint for OTLP HTTP receiver.
- containerPort: 55680 # Old endpoint for OTLP gRPC receiver.
- containerPort: 55681 # Default endpoint for OTLP HTTP receiver. (deprecated)
volumeMounts:
- name: tracesgateway-config-vol
mountPath: /conf
{{- if $tracesGateway.deployment.extraVolumeMounts }}
{{- toYaml $tracesGateway.deployment.extraVolumeMounts | nindent 8 }}
{{- end }}
livenessProbe:
httpGet:
path: /
port: 13133 # Health Check extension default port.
{{- toYaml $tracesGateway.deployment.livenessProbe | nindent 10 }}
readinessProbe:
httpGet:
path: /
port: 13133 # Health Check extension default port.
{{- toYaml $tracesGateway.deployment.readinessProbe | nindent 10 }}
startupProbe:
httpGet:
path: /
port: 13133
{{- toYaml $tracesGateway.deployment.startupProbe | nindent 10 }}
volumes:
- configMap:
name: {{ template "sumologic.metadata.name.tracesgateway.configmap" . }}
name: tracesgateway-config-vol
{{- if $tracesGateway.deployment.extraVolumes }}
{{- toYaml $tracesGateway.deployment.extraVolumes | nindent 8 }}
{{- end }}
{{- end }}