added repo
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
{{/*
|
||||
query image
|
||||
*/}}
|
||||
{{- define "tempo.queryImage" -}}
|
||||
{{- $dict := dict "tempo" .Values.tempo.image "component" .Values.queryFrontend.query.image "global" .Values.global.image "defaultVersion" .Chart.AppVersion -}}
|
||||
{{- include "tempo.tempoImage" $dict -}}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
queryFrontend imagePullSecrets
|
||||
*/}}
|
||||
{{- define "tempo.queryFrontendImagePullSecrets" -}}
|
||||
{{- $dict := dict "tempo" .Values.tempo.image "component" .Values.queryFrontend.image "global" .Values.global.image -}}
|
||||
{{- include "tempo.imagePullSecrets" $dict -}}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
query imagePullSecrets
|
||||
*/}}
|
||||
{{- define "tempo.queryImagePullSecrets" -}}
|
||||
{{- $dict := dict "tempo" .Values.tempo.image "component" .Values.queryFrontend.query.image "global" .Values.global.image -}}
|
||||
{{- include "tempo.imagePullSecrets" $dict -}}
|
||||
{{- end }}
|
||||
+175
@@ -0,0 +1,175 @@
|
||||
{{ $dict := dict "ctx" . "component" "query-frontend" }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "tempo.resourceName" $dict }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "tempo.labels" $dict | nindent 4 }}
|
||||
{{- with .Values.queryFrontend.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
minReadySeconds: 10
|
||||
{{- if not .Values.queryFrontend.autoscaling.enabled }}
|
||||
replicas: {{ .Values.queryFrontend.replicas }}
|
||||
{{- end }}
|
||||
revisionHistoryLimit: 10
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "tempo.selectorLabels" $dict | nindent 6 }}
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 0
|
||||
maxUnavailable: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "tempo.podLabels" $dict | nindent 8 }}
|
||||
{{- with .Values.tempo.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.queryFrontend.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.queryFrontend.podAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if or (.Values.queryFrontend.priorityClassName) (.Values.global.priorityClassName) }}
|
||||
priorityClassName: {{ default .Values.queryFrontend.priorityClassName .Values.global.priorityClassName }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "tempo.serviceAccountName" . }}
|
||||
{{- with .Values.tempo.podSecurityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
enableServiceLinks: false
|
||||
{{- include "tempo.queryImagePullSecrets" . | nindent 6 -}}
|
||||
{{- with .Values.queryFrontend.hostAliases }}
|
||||
hostAliases:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- args:
|
||||
- -target=query-frontend
|
||||
- -config.file=/conf/tempo.yaml
|
||||
- -mem-ballast-size-mbs=1024
|
||||
{{- with .Values.queryFrontend.extraArgs }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
image: {{ include "tempo.imageReference" $dict }}
|
||||
imagePullPolicy: {{ .Values.tempo.image.pullPolicy }}
|
||||
name: query-frontend
|
||||
ports:
|
||||
- containerPort: 3100
|
||||
name: http-metrics
|
||||
- containerPort: 9095
|
||||
name: grpc
|
||||
{{- with .Values.queryFrontend.extraEnv }}
|
||||
env:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.queryFrontend.extraEnvFrom }}
|
||||
envFrom:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{- toYaml .Values.queryFrontend.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-queryfrontend-store
|
||||
{{- if .Values.enterprise.enabled }}
|
||||
- name: license
|
||||
mountPath: /license
|
||||
{{- end }}
|
||||
{{- with .Values.queryFrontend.extraVolumeMounts }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.queryFrontend.query.enabled }}
|
||||
- args:
|
||||
- --query.base-path=/
|
||||
- --grpc-storage-plugin.configuration-file=/conf/tempo-query.yaml
|
||||
- --query.bearer-token-propagation=true
|
||||
{{- with .Values.queryFrontend.query.extraArgs }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
image: {{ include "tempo.queryImage" . }}
|
||||
imagePullPolicy: {{ .Values.tempo.image.pullPolicy }}
|
||||
name: tempo-query
|
||||
ports:
|
||||
- containerPort: {{ .Values.queryFrontend.service.port }}
|
||||
name: jaeger-ui
|
||||
- containerPort: 16687
|
||||
name: jaeger-metrics
|
||||
{{- with .Values.queryFrontend.query.extraEnv }}
|
||||
env:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.queryFrontend.query.extraEnvFrom }}
|
||||
envFrom:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{- toYaml .Values.queryFrontend.query.resources | nindent 12 }}
|
||||
{{- with .Values.tempo.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- mountPath: /conf
|
||||
name: config
|
||||
{{- with .Values.queryFrontend.query.extraVolumeMounts }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end}}
|
||||
terminationGracePeriodSeconds: {{ .Values.queryFrontend.terminationGracePeriodSeconds }}
|
||||
{{- if semverCompare ">= 1.19-0" .Capabilities.KubeVersion.Version }}
|
||||
{{- with .Values.queryFrontend.topologySpreadConstraints }}
|
||||
topologySpreadConstraints:
|
||||
{{- tpl . $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- /*
|
||||
{{- with .Values.queryFrontend.affinity }}
|
||||
affinity:
|
||||
{{- tpl . $ | nindent 8 }}
|
||||
{{- end }}
|
||||
*/ -}}
|
||||
{{- with .Values.queryFrontend.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.queryFrontend.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: config
|
||||
{{- include "tempo.configVolume" . | nindent 10 }}
|
||||
- name: runtime-config
|
||||
{{- include "tempo.runtimeVolume" . | nindent 10 }}
|
||||
- name: tempo-queryfrontend-store
|
||||
emptyDir: {}
|
||||
{{- if .Values.enterprise.enabled }}
|
||||
- name: license
|
||||
secret:
|
||||
secretName: {{ tpl .Values.license.secretName . }}
|
||||
{{- end }}
|
||||
{{- with .Values.queryFrontend.extraVolumes }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,45 @@
|
||||
{{- if .Values.queryFrontend.autoscaling.enabled }}
|
||||
{{- $apiVersion := include "tempo.hpa.apiVersion" . -}}
|
||||
apiVersion: {{ $apiVersion }}
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "tempo.resourceName" (dict "ctx" . "component" "query-frontend") }}
|
||||
labels:
|
||||
{{- include "tempo.labels" (dict "ctx" . "component" "query-frontend") | nindent 4 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "tempo.resourceName" (dict "ctx" . "component" "query-frontend") }}
|
||||
minReplicas: {{ .Values.queryFrontend.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.queryFrontend.autoscaling.maxReplicas }}
|
||||
{{- with .Values.queryFrontend.autoscaling.behavior }}
|
||||
behavior:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
metrics:
|
||||
{{- with .Values.queryFrontend.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
{{- if (eq $apiVersion "autoscaling/v2") }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ . }}
|
||||
{{- else }}
|
||||
targetAverageUtilization: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.queryFrontend.autoscaling.targetCPUUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
{{- if (eq $apiVersion "autoscaling/v2") }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ . }}
|
||||
{{- else }}
|
||||
targetAverageUtilization: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,54 @@
|
||||
{{- if and .Values.queryFrontend.query.enabled .Values.queryFrontend.ingress.enabled -}}
|
||||
{{ $dict := dict "ctx" . "component" "query-frontend" }}
|
||||
{{- $ingressApiIsStable := eq (include "tempo.ingress.isStable" .) "true" -}}
|
||||
{{- $ingressSupportsIngressClassName := eq (include "tempo.ingress.supportsIngressClassName" .) "true" -}}
|
||||
{{- $ingressSupportsPathType := eq (include "tempo.ingress.supportsPathType" .) "true" -}}
|
||||
apiVersion: {{ include "tempo.ingress.apiVersion" . }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ include "tempo.resourceName" $dict }}
|
||||
labels:
|
||||
{{- include "tempo.labels" $dict | nindent 4 }}
|
||||
{{- with .Values.queryFrontend.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and $ingressSupportsIngressClassName .Values.queryFrontend.ingress.ingressClassName }}
|
||||
ingressClassName: {{ .Values.queryFrontend.ingress.ingressClassName }}
|
||||
{{- end -}}
|
||||
{{- if .Values.queryFrontend.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.queryFrontend.ingress.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- with .secretName }}
|
||||
secretName: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.queryFrontend.ingress.hosts }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
{{- if $ingressSupportsPathType }}
|
||||
pathType: {{ .pathType }}
|
||||
{{- end }}
|
||||
backend:
|
||||
{{- if $ingressApiIsStable }}
|
||||
service:
|
||||
name: {{ include "tempo.resourceName" $dict }}
|
||||
port:
|
||||
number: {{ $.Values.queryFrontend.service.port }}
|
||||
{{- else }}
|
||||
serviceName: {{ include "tempo.resourceName" $dict }}
|
||||
servicePort: {{ $.Values.queryFrontend.service.port }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
{{- if gt (int .Values.queryFrontend.replicas) 1 }}
|
||||
{{ $dict := dict "ctx" . "component" "query-frontend" }}
|
||||
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 }}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "tempo.resourceName" (dict "ctx" . "component" "query-frontend-discovery") }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "tempo.labels" (dict "ctx" . "component" "query-frontend") | nindent 4 }}
|
||||
{{- with .Values.queryFrontend.serviceDiscovery.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.queryFrontend.serviceDiscovery.annotations }}
|
||||
annotations:
|
||||
{{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: http
|
||||
port: 3100
|
||||
targetPort: 3100
|
||||
- name: grpc
|
||||
port: 9095
|
||||
protocol: TCP
|
||||
targetPort: 9095
|
||||
{{- if .Values.queryFrontend.appProtocol.grpc }}
|
||||
appProtocol: {{ .Values.queryFrontend.appProtocol.grpc }}
|
||||
{{- end }}
|
||||
- name: grpclb
|
||||
port: 9096
|
||||
protocol: TCP
|
||||
targetPort: grpc
|
||||
{{- if .Values.queryFrontend.appProtocol.grpc }}
|
||||
appProtocol: {{ .Values.queryFrontend.appProtocol.grpc }}
|
||||
{{- end }}
|
||||
{{- if .Values.queryFrontend.query.enabled }}
|
||||
- name: tempo-query-jaeger-ui
|
||||
port: {{ .Values.queryFrontend.service.port }}
|
||||
targetPort: {{ .Values.queryFrontend.service.port }}
|
||||
- name: tempo-query-metrics
|
||||
port: 16687
|
||||
targetPort: jaeger-metrics
|
||||
{{- end }}
|
||||
publishNotReadyAddresses: true
|
||||
selector:
|
||||
{{- include "tempo.selectorLabels" (dict "ctx" . "component" "query-frontend") | nindent 4 }}
|
||||
@@ -0,0 +1,44 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "tempo.resourceName" (dict "ctx" . "component" "query-frontend") }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "tempo.labels" (dict "ctx" . "component" "query-frontend") | nindent 4 }}
|
||||
{{- with .Values.queryFrontend.service.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.queryFrontend.service.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.queryFrontend.service.type }}
|
||||
ports:
|
||||
- name: http-metrics
|
||||
port: 3100
|
||||
targetPort: 3100
|
||||
- name: grpc
|
||||
port: 9095
|
||||
protocol: TCP
|
||||
targetPort: 9095
|
||||
{{- if .Values.queryFrontend.appProtocol.grpc }}
|
||||
appProtocol: {{ .Values.queryFrontend.appProtocol.grpc }}
|
||||
{{- end }}
|
||||
{{- if .Values.queryFrontend.query.enabled }}
|
||||
- name: tempo-query-jaeger-ui
|
||||
port: {{ .Values.queryFrontend.service.port }}
|
||||
targetPort: {{ .Values.queryFrontend.service.port }}
|
||||
- name: tempo-query-metrics
|
||||
port: 16687
|
||||
targetPort: jaeger-metrics
|
||||
{{- end }}
|
||||
{{- if .Values.queryFrontend.service.loadBalancerIP }}
|
||||
loadBalancerIP: {{ .Values.queryFrontend.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- with .Values.queryFrontend.service.loadBalancerSourceRanges}}
|
||||
loadBalancerSourceRanges:
|
||||
{{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "tempo.selectorLabels" (dict "ctx" . "component" "query-frontend") | nindent 4 }}
|
||||
+1
@@ -0,0 +1 @@
|
||||
{{- include "tempo.lib.serviceMonitor" (dict "ctx" $ "component" "tempo-query") }}
|
||||
+1
@@ -0,0 +1 @@
|
||||
{{- include "tempo.lib.serviceMonitor" (dict "ctx" $ "component" "query-frontend") }}
|
||||
Reference in New Issue
Block a user