added repo
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
{{/*
|
||||
distributor imagePullSecrets
|
||||
*/}}
|
||||
{{- define "tempo.distributorImagePullSecrets" -}}
|
||||
{{- $dict := dict "tempo" .Values.tempo.image "component" .Values.distributor.image "global" .Values.global.image -}}
|
||||
{{- include "tempo.imagePullSecrets" $dict -}}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,175 @@
|
||||
{{ $dict := dict "ctx" . "component" "distributor" "memberlist" true }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "tempo.resourceName" $dict }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "tempo.labels" $dict | nindent 4 }}
|
||||
{{- with .Values.distributor.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
minReadySeconds: 10
|
||||
{{- if not .Values.distributor.autoscaling.enabled }}
|
||||
replicas: {{ .Values.distributor.replicas }}
|
||||
{{- end }}
|
||||
revisionHistoryLimit: 10
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "tempo.selectorLabels" $dict | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "tempo.podLabels" $dict | nindent 8 }}
|
||||
{{- with .Values.tempo.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.distributor.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/configmap-tempo.yaml") . | sha256sum }}
|
||||
{{- with .Values.tempo.podAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.distributor.podAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if or (.Values.distributor.priorityClassName) (.Values.global.priorityClassName) }}
|
||||
priorityClassName: {{ default .Values.distributor.priorityClassName .Values.global.priorityClassName }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "tempo.serviceAccountName" . }}
|
||||
{{- with .Values.tempo.podSecurityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
enableServiceLinks: false
|
||||
{{- include "tempo.distributorImagePullSecrets" . | nindent 6 -}}
|
||||
{{- with .Values.distributor.hostAliases }}
|
||||
hostAliases:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- args:
|
||||
- -target=distributor
|
||||
- -config.file=/conf/tempo.yaml
|
||||
- -mem-ballast-size-mbs=1024
|
||||
{{- with .Values.distributor.extraArgs }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
image: {{ include "tempo.imageReference" $dict }}
|
||||
imagePullPolicy: {{ .Values.tempo.image.pullPolicy }}
|
||||
name: distributor
|
||||
ports:
|
||||
- containerPort: {{ include "tempo.memberlistBindPort" . }}
|
||||
name: http-memberlist
|
||||
protocol: TCP
|
||||
- containerPort: 3100
|
||||
name: http-metrics
|
||||
{{- if .Values.traces.jaeger.thriftCompact.enabled }}
|
||||
- containerPort: 6831
|
||||
name: jaeger-compact
|
||||
protocol: UDP
|
||||
{{- end }}
|
||||
{{- if .Values.traces.jaeger.thriftBinary.enabled }}
|
||||
- containerPort: 6832
|
||||
name: jaeger-binary
|
||||
protocol: UDP
|
||||
{{- end }}
|
||||
{{- if .Values.traces.jaeger.thriftHttp.enabled }}
|
||||
- containerPort: 14268
|
||||
name: jaeger-http
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
{{- if .Values.traces.jaeger.grpc.enabled }}
|
||||
- containerPort: 14250
|
||||
name: grpc-jaeger
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
{{- if .Values.traces.zipkin.enabled }}
|
||||
- containerPort: 9411
|
||||
name: zipkin
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
{{- if .Values.traces.otlp.http.enabled }}
|
||||
- containerPort: 4318
|
||||
name: otlp-http
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
{{- if .Values.traces.otlp.grpc.enabled }}
|
||||
- containerPort: 4317
|
||||
name: grpc-otlp
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
{{- if .Values.traces.opencensus.enabled }}
|
||||
- containerPort: 55678
|
||||
name: opencensus
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
{{- with .Values.distributor.extraEnv }}
|
||||
env:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.distributor.extraEnvFrom }}
|
||||
envFrom:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
readinessProbe:
|
||||
{{- toYaml .Values.tempo.readinessProbe | nindent 12 }}
|
||||
resources:
|
||||
{{- toYaml .Values.distributor.resources | nindent 12 }}
|
||||
{{- with .Values.tempo.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- mountPath: /conf
|
||||
name: config
|
||||
- mountPath: /runtime-config
|
||||
name: runtime-config
|
||||
- mountPath: /var/tempo
|
||||
name: tempo-distributor-store
|
||||
{{- if .Values.enterprise.enabled }}
|
||||
- name: license
|
||||
mountPath: /license
|
||||
{{- end }}
|
||||
{{- with .Values.distributor.extraVolumeMounts }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
terminationGracePeriodSeconds: {{ .Values.distributor.terminationGracePeriodSeconds }}
|
||||
{{- if semverCompare ">= 1.19-0" .Capabilities.KubeVersion.Version }}
|
||||
{{- with .Values.distributor.topologySpreadConstraints }}
|
||||
topologySpreadConstraints:
|
||||
{{- tpl . $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.distributor.affinity }}
|
||||
affinity:
|
||||
{{- tpl . $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.distributor.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.distributor.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: config
|
||||
{{- include "tempo.configVolume" . | nindent 10 }}
|
||||
- name: runtime-config
|
||||
{{- include "tempo.runtimeVolume" . | nindent 10 }}
|
||||
- name: tempo-distributor-store
|
||||
emptyDir: {}
|
||||
{{- if .Values.enterprise.enabled }}
|
||||
- name: license
|
||||
secret:
|
||||
secretName: {{ tpl .Values.license.secretName . }}
|
||||
{{- end }}
|
||||
{{- with .Values.distributor.extraVolumes }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,45 @@
|
||||
{{- if .Values.distributor.autoscaling.enabled }}
|
||||
{{- $apiVersion := include "tempo.hpa.apiVersion" . -}}
|
||||
apiVersion: {{ $apiVersion }}
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "tempo.resourceName" (dict "ctx" . "component" "distributor") }}
|
||||
labels:
|
||||
{{- include "tempo.labels" (dict "ctx" . "component" "distributor") | nindent 4 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "tempo.resourceName" (dict "ctx" . "component" "distributor") }}
|
||||
minReplicas: {{ .Values.distributor.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.distributor.autoscaling.maxReplicas }}
|
||||
{{- with .Values.distributor.autoscaling.behavior }}
|
||||
behavior:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
metrics:
|
||||
{{- with .Values.distributor.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
{{- if (eq $apiVersion "autoscaling/v2") }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ . }}
|
||||
{{- else }}
|
||||
targetAverageUtilization: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.distributor.autoscaling.targetCPUUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
{{- if (eq $apiVersion "autoscaling/v2") }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ . }}
|
||||
{{- else }}
|
||||
targetAverageUtilization: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
{{- if gt (int .Values.distributor.replicas) 1 }}
|
||||
{{ $dict := dict "ctx" . "component" "distributor" "memberlist" true }}
|
||||
apiVersion: {{ include "tempo.pdb.apiVersion" . }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "tempo.resourceName" $dict }}
|
||||
labels:
|
||||
{{- include "tempo.labels" $dict | nindent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "tempo.selectorLabels" $dict | nindent 6 }}
|
||||
maxUnavailable: 1
|
||||
{{- end }}
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
{{- $dict := dict "ctx" . "component" "distributor" }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "tempo.resourceName" $dict }}-discovery
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "tempo.labels" $dict | nindent 4 }}
|
||||
{{- with .Values.distributor.serviceDiscovery.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
prometheus.io/service-monitor: "false"
|
||||
{{- with .Values.distributor.serviceDiscovery.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: http-metrics
|
||||
port: 3100
|
||||
targetPort: http-metrics
|
||||
{{- if .Values.traces.jaeger.thriftCompact.enabled }}
|
||||
- name: distributor-jaeger-thrift-compact
|
||||
port: 6831
|
||||
protocol: UDP
|
||||
targetPort: jaeger-compact
|
||||
{{- end }}
|
||||
{{- if .Values.traces.jaeger.thriftBinary.enabled }}
|
||||
- name: distributor-jaeger-thrift-binary
|
||||
port: 6832
|
||||
protocol: UDP
|
||||
targetPort: jaeger-binary
|
||||
{{- end }}
|
||||
{{- if .Values.traces.jaeger.thriftHttp.enabled }}
|
||||
- name: distributor-jaeger-thrift-http
|
||||
port: 14268
|
||||
protocol: TCP
|
||||
targetPort: jaeger-http
|
||||
{{- end }}
|
||||
{{- if .Values.traces.jaeger.grpc.enabled }}
|
||||
- name: grpc-distributor-jaeger
|
||||
port: 14250
|
||||
protocol: TCP
|
||||
targetPort: grpc-jaeger
|
||||
{{- if .Values.distributor.appProtocol.grpc }}
|
||||
appProtocol: {{ .Values.distributor.appProtocol.grpc }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.traces.zipkin.enabled }}
|
||||
- name: distributor-zipkin
|
||||
port: 9411
|
||||
protocol: TCP
|
||||
targetPort: zipkin
|
||||
{{- end }}
|
||||
{{- if .Values.traces.otlp.http.enabled }}
|
||||
- name: distributor-otlp-http
|
||||
port: 4318
|
||||
protocol: TCP
|
||||
targetPort: otlp-http
|
||||
{{- end }}
|
||||
{{- if .Values.traces.otlp.grpc.enabled }}
|
||||
- name: grpc-distributor-otlp
|
||||
port: 4317
|
||||
protocol: TCP
|
||||
targetPort: grpc-otlp
|
||||
{{- if .Values.distributor.appProtocol.grpc }}
|
||||
appProtocol: {{ .Values.distributor.appProtocol.grpc }}
|
||||
{{- end }}
|
||||
- name: distributor-otlp-legacy
|
||||
port: 55680
|
||||
protocol: TCP
|
||||
targetPort: grpc-otlp
|
||||
{{- if .Values.distributor.appProtocol.grpc }}
|
||||
appProtocol: {{ .Values.distributor.appProtocol.grpc }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.traces.opencensus.enabled }}
|
||||
- name: distributor-opencensus
|
||||
port: 55678
|
||||
protocol: TCP
|
||||
targetPort: opencensus
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "tempo.selectorLabels" $dict | nindent 4 }}
|
||||
@@ -0,0 +1,102 @@
|
||||
{{- $dict := dict "ctx" . "component" "distributor" }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "tempo.resourceName" $dict }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "tempo.labels" $dict | nindent 4 }}
|
||||
{{- with .Values.distributor.service.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.distributor.service.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.distributor.service.type }}
|
||||
ports:
|
||||
- name: http-metrics
|
||||
port: 3100
|
||||
targetPort: http-metrics
|
||||
- name: grpc
|
||||
port: 9095
|
||||
protocol: TCP
|
||||
targetPort: 9095
|
||||
{{- if .Values.distributor.appProtocol.grpc }}
|
||||
appProtocol: {{ .Values.distributor.appProtocol.grpc }}
|
||||
{{- end }}
|
||||
{{- if .Values.traces.jaeger.thriftCompact.enabled }}
|
||||
- name: distributor-jaeger-thrift-compact
|
||||
port: 6831
|
||||
protocol: UDP
|
||||
targetPort: jaeger-compact
|
||||
{{- end }}
|
||||
{{- if .Values.traces.jaeger.thriftBinary.enabled }}
|
||||
- name: distributor-jaeger-thrift-binary
|
||||
port: 6832
|
||||
protocol: UDP
|
||||
targetPort: jaeger-binary
|
||||
{{- end }}
|
||||
{{- if .Values.traces.jaeger.thriftHttp.enabled }}
|
||||
- name: distributor-jaeger-thrift-http
|
||||
port: 14268
|
||||
protocol: TCP
|
||||
targetPort: jaeger-http
|
||||
{{- end }}
|
||||
{{- if .Values.traces.jaeger.grpc.enabled }}
|
||||
- name: grpc-distributor-jaeger
|
||||
port: 14250
|
||||
protocol: TCP
|
||||
targetPort: grpc-jaeger
|
||||
{{- if .Values.distributor.appProtocol.grpc }}
|
||||
appProtocol: {{ .Values.distributor.appProtocol.grpc }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.traces.zipkin.enabled }}
|
||||
- name: distributor-zipkin
|
||||
port: 9411
|
||||
protocol: TCP
|
||||
targetPort: zipkin
|
||||
{{- end }}
|
||||
{{- if .Values.traces.otlp.http.enabled }}
|
||||
- name: distributor-otlp-http
|
||||
port: 4318
|
||||
protocol: TCP
|
||||
targetPort: otlp-http
|
||||
{{- end }}
|
||||
{{- if .Values.traces.otlp.grpc.enabled }}
|
||||
- name: grpc-distributor-otlp
|
||||
port: 4317
|
||||
protocol: TCP
|
||||
targetPort: grpc-otlp
|
||||
{{- if .Values.distributor.appProtocol.grpc }}
|
||||
appProtocol: {{ .Values.distributor.appProtocol.grpc }}
|
||||
{{- end }}
|
||||
- name: distributor-otlp-legacy
|
||||
port: 55680
|
||||
protocol: TCP
|
||||
targetPort: grpc-otlp
|
||||
{{- if .Values.distributor.appProtocol.grpc }}
|
||||
appProtocol: {{ .Values.distributor.appProtocol.grpc }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.traces.opencensus.enabled }}
|
||||
- name: distributor-opencensus
|
||||
port: 55678
|
||||
protocol: TCP
|
||||
targetPort: opencensus
|
||||
{{- end }}
|
||||
{{- if .Values.distributor.service.loadBalancerIP }}
|
||||
loadBalancerIP: {{ .Values.distributor.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- with .Values.distributor.service.externalTrafficPolicy }}
|
||||
externalTrafficPolicy: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.distributor.service.loadBalancerSourceRanges}}
|
||||
loadBalancerSourceRanges:
|
||||
{{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "tempo.selectorLabels" $dict | nindent 4 }}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{{- include "tempo.lib.serviceMonitor" (dict "ctx" $ "component" "distributor" "memberlist" true) }}
|
||||
Reference in New Issue
Block a user