added repo

This commit is contained in:
Your Name
2026-08-26 03:39:42 +05:30
parent 45c25a95af
commit b8575bb8b9
6889 changed files with 1217125 additions and 0 deletions
@@ -0,0 +1,23 @@
{{/*
gateway auth secret name
*/}}
{{- define "tempo.gatewayAuthSecret" -}}
{{ .Values.gateway.basicAuth.existingSecret | default (include "tempo.resourceName" (dict "ctx" . "component" "gateway")) }}
{{- end }}
{{/*
gateway image
*/}}
{{- define "tempo.gatewayImage" -}}
{{- $dict := dict "tempo" (dict) "service" .Values.gateway.image "global" .Values.global.image -}}
{{- include "tempo.tempoImage" $dict -}}
{{- end }}
{{/*
gateway imagePullSecrets
*/}}
{{- define "tempo.gatewayImagePullSecrets" -}}
{{- $dict := dict "component" .Values.gateway.image "global" .Values.global.image "tempo" (dict) -}}
{{- include "tempo.imagePullSecrets" $dict -}}
{{- end }}
@@ -0,0 +1,12 @@
{{- if .Values.gateway.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "tempo.resourceName" (dict "ctx" . "component" "gateway") }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "tempo.labels" (dict "ctx" . "component" "gateway") | nindent 4 }}
data:
nginx.conf: |
{{- tpl .Values.gateway.nginxConfig.file . | nindent 4 }}
{{- end }}
@@ -0,0 +1,134 @@
{{- if .Values.gateway.enabled }}
{{ $dict := dict "ctx" . "component" "gateway" }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "tempo.resourceName" $dict }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "tempo.labels" $dict | nindent 4 }}
spec:
minReadySeconds: 10
{{- if not .Values.gateway.autoscaling.enabled }}
replicas: {{ .Values.gateway.replicas }}
{{- end }}
revisionHistoryLimit: 10
selector:
matchLabels:
{{- include "tempo.selectorLabels" $dict | nindent 6 }}
template:
metadata:
annotations:
checksum/config: {{ include (print .Template.BasePath "/gateway/configmap-gateway.yaml") . | sha256sum }}
{{- with .Values.tempo.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.gateway.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "tempo.selectorLabels" $dict | nindent 8 }}
{{- with .Values.tempo.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.gateway.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if or (.Values.gateway.priorityClassName) (.Values.global.priorityClassName) }}
priorityClassName: {{ default .Values.gateway.priorityClassName .Values.global.priorityClassName }}
{{- end }}
serviceAccountName: {{ include "tempo.serviceAccountName" . }}
{{- with .Values.tempo.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
terminationGracePeriodSeconds: {{ .Values.gateway.terminationGracePeriodSeconds }}
enableServiceLinks: false
{{- include "tempo.gatewayImagePullSecrets" . | nindent 6 -}}
{{- with .Values.gateway.hostAliases }}
hostAliases:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: nginx
image: "{{ include "tempo.imageReference" $dict }}"
imagePullPolicy: {{ .Values.gateway.image.pullPolicy }}
ports:
- name: http-metrics
containerPort: 8080
protocol: TCP
{{- with .Values.gateway.extraEnv }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.gateway.extraEnvFrom }}
envFrom:
{{- toYaml . | nindent 12 }}
{{- end }}
readinessProbe:
{{- toYaml .Values.gateway.readinessProbe | nindent 12 }}
volumeMounts:
- name: config
mountPath: /etc/nginx
{{- if .Values.enterprise.enabled }}
- name: license
mountPath: /license
{{- end }}
{{- if .Values.gateway.basicAuth.enabled }}
- name: auth
mountPath: /etc/nginx/secrets
{{- end }}
- name: tmp
mountPath: /tmp
- name: docker-entrypoint-d-override
mountPath: /docker-entrypoint.d
{{- if .Values.gateway.extraVolumeMounts }}
{{- toYaml .Values.gateway.extraVolumeMounts | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.gateway.resources | nindent 12 }}
{{- with .Values.tempo.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if semverCompare ">= 1.19-0" .Capabilities.KubeVersion.Version }}
{{- with .Values.gateway.topologySpreadConstraints }}
topologySpreadConstraints:
{{- tpl . $ | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.gateway.affinity }}
affinity:
{{- tpl . $ | nindent 8 }}
{{- end }}
{{- with .Values.gateway.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.gateway.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: config
configMap:
name: {{ include "tempo.resourceName" (dict "ctx" . "component" "gateway") }}
{{- if .Values.enterprise.enabled -}}
- name: license
secret:
secretName: {{ tpl .Values.license.secretName . }}
{{- end }}
{{- if .Values.gateway.basicAuth.enabled }}
- name: auth
secret:
secretName: {{ include "tempo.gatewayAuthSecret" . }}
{{- end }}
- name: tmp
emptyDir: {}
- name: docker-entrypoint-d-override
emptyDir: {}
{{- if .Values.gateway.extraVolumes }}
{{- toYaml .Values.gateway.extraVolumes | nindent 8 }}
{{- end }}
{{- end }}
@@ -0,0 +1,46 @@
{{- if .Values.gateway.autoscaling.enabled }}
{{- $apiVersion := include "tempo.hpa.apiVersion" . -}}
apiVersion: {{ $apiVersion }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "tempo.resourceName" (dict "ctx" . "component" "gateway") }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "tempo.labels" (dict "ctx" . "component" "gateway") | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "tempo.resourceName" (dict "ctx" . "component" "gateway") }}
minReplicas: {{ .Values.gateway.autoscaling.minReplicas }}
maxReplicas: {{ .Values.gateway.autoscaling.maxReplicas }}
{{- with .Values.gateway.autoscaling.behavior }}
behavior:
{{- toYaml . | nindent 4 }}
{{- end }}
metrics:
{{- with .Values.gateway.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
{{- if (eq $apiVersion "autoscaling/v2") }}
target:
type: Utilization
averageUtilization: {{ . }}
{{- else }}
targetAverageUtilization: {{ . }}
{{- end }}
{{- end }}
{{- with .Values.gateway.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
{{- if (eq $apiVersion "autoscaling/v2") }}
target:
type: Utilization
averageUtilization: {{ . }}
{{- else }}
targetAverageUtilization: {{ . }}
{{- end }}
{{- end }}
{{- end }}
@@ -0,0 +1,60 @@
{{- if .Values.gateway.enabled -}}
{{- if .Values.gateway.ingress.enabled -}}
{{ $dict := dict "ctx" . "component" "gateway" }}
{{- $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 }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "tempo.labels" (dict "ctx" . "component" "gateway") | nindent 4 }}
{{- with .Values.gateway.ingress.labels }}
{{- toYaml . | nindent 4}}
{{- end}}
{{- with .Values.gateway.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and $ingressSupportsIngressClassName .Values.gateway.ingress.ingressClassName }}
ingressClassName: {{ .Values.gateway.ingress.ingressClassName }}
{{- end -}}
{{- if .Values.gateway.ingress.tls }}
tls:
{{- range .Values.gateway.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
{{- with .secretName }}
secretName: {{ . }}
{{- end }}
{{- end }}
{{- end }}
rules:
{{- range .Values.gateway.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.gateway.service.port }}
{{- else }}
serviceName: {{ include "tempo.resourceName" $dict }}
servicePort: {{ $.Values.gateway.service.port }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
@@ -0,0 +1,15 @@
{{- if gt (int .Values.gateway.replicas) 1 }}
{{ $dict := dict "ctx" . "component" "gateway" }}
apiVersion: {{ include "tempo.pdb.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ include "tempo.resourceName" $dict }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "tempo.labels" $dict | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "tempo.selectorLabels" $dict | nindent 6 }}
maxUnavailable: 1
{{- end }}
@@ -0,0 +1,16 @@
{{- $root := . -}}
{{- $dict := dict "ctx" . "component" "gateway" -}}
{{- with .Values.gateway }}
{{- if and .enabled .basicAuth.enabled (not .basicAuth.existingSecret) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "tempo.resourceName" $dict }}
namespace: {{ $root.Release.Namespace | quote }}
labels:
{{- include "tempo.labels" $dict | nindent 4 }}
stringData:
.htpasswd: |
{{- tpl .basicAuth.htpasswd $dict.ctx | nindent 4 }}
{{- end }}
{{- end }}
@@ -0,0 +1,40 @@
{{- if .Values.gateway.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "tempo.resourceName" (dict "ctx" . "component" "gateway") }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "tempo.labels" (dict "ctx" . "component" "gateway") | nindent 4 }}
{{- with .Values.gateway.service.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.gateway.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.gateway.service.type }}
{{- with .Values.gateway.service.clusterIP }}
clusterIP: {{ . }}
{{- end }}
{{- if and (eq "LoadBalancer" .Values.gateway.service.type) .Values.gateway.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.gateway.service.loadBalancerIP }}
{{- end }}
ports:
- name: http-metrics
port: {{ .Values.gateway.service.port }}
targetPort: http-metrics
{{- if and (eq "NodePort" .Values.gateway.service.type) .Values.gateway.service.nodePort }}
nodePort: {{ .Values.gateway.service.nodePort }}
{{- end }}
protocol: TCP
{{ range .Values.gateway.service.additionalPorts }}
- name: {{ .name }}
port: {{ .port }}
targetPort: {{ .targetPort }}
protocol: {{ .protocol }}
{{ end }}
selector:
{{- include "tempo.selectorLabels" (dict "ctx" . "component" "gateway") | nindent 4 }}
{{- end }}