---
# Source: tempo/templates/networkpolicy.yaml
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: tempo
  namespace: tempo
  labels:
    helm.sh/chart: tempo-1.24.4
    app.kubernetes.io/name: tempo
    app.kubernetes.io/instance: tempo
    app.kubernetes.io/version: "2.9.0"
    app.kubernetes.io/managed-by: Helm
spec:
  policyTypes:
    - Ingress
  podSelector:
    matchLabels:
      app.kubernetes.io/name: tempo
      app.kubernetes.io/instance: tempo
  ingress:
    - ports:
      - port: 3200
---
# Source: tempo/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: tempo
  namespace: tempo
  labels:
    helm.sh/chart: tempo-1.24.4
    app.kubernetes.io/name: tempo
    app.kubernetes.io/instance: tempo
    app.kubernetes.io/version: "2.9.0"
    app.kubernetes.io/managed-by: Helm
automountServiceAccountToken: true
---
# Source: tempo/templates/configmap-tempo-query.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: tempo-query
  namespace: tempo
  labels:
    helm.sh/chart: tempo-1.24.4
    app.kubernetes.io/name: tempo
    app.kubernetes.io/instance: tempo
    app.kubernetes.io/version: "2.9.0"
    app.kubernetes.io/managed-by: Helm
data:
  tempo-query.yaml: |
    backend: tempo:3200
---
# Source: tempo/templates/configmap-tempo.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: tempo
  namespace: tempo
  labels:
    helm.sh/chart: tempo-1.24.4
    app.kubernetes.io/name: tempo
    app.kubernetes.io/instance: tempo
    app.kubernetes.io/version: "2.9.0"
    app.kubernetes.io/managed-by: Helm
data:
  overrides.yaml: |
    overrides:
      {}
  tempo.yaml: |
    memberlist:
      cluster_label: "tempo.tempo"
    multitenancy_enabled: false
    usage_report:
      reporting_enabled: false
    compactor:
      compaction:
        block_retention: 24h
    distributor:
      receivers:
            jaeger:
              protocols:
                grpc:
                  endpoint: 0.0.0.0:14250
                thrift_binary:
                  endpoint: 0.0.0.0:6832
                thrift_compact:
                  endpoint: 0.0.0.0:6831
                thrift_http:
                  endpoint: 0.0.0.0:14268
            opencensus: null
            otlp:
              protocols:
                grpc:
                  endpoint: 0.0.0.0:4317
                http:
                  endpoint: 0.0.0.0:4318
    ingester:
          {}
    server:
          http_listen_port: 3200
    storage:
          trace:
            backend: s3
            s3:
              bucket: tempo-traces
              endpoint: tempo-object-store.tempo.svc.cluster.local:9000
              forcepathstyle: true
              insecure: true
              region: us-east-1
            wal:
              path: /var/tempo/wal
    querier:
          {}
    query_frontend:
          {}
    overrides:
          defaults: {}
          per_tenant_override_config: /conf/overrides.yaml
---
# Source: tempo/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: tempo
  namespace: tempo
  labels:
    helm.sh/chart: tempo-1.24.4
    app.kubernetes.io/name: tempo
    app.kubernetes.io/instance: tempo
    app.kubernetes.io/version: "2.9.0"
    app.kubernetes.io/managed-by: Helm
spec:
  type: ClusterIP
  ports:
  - name: tempo-jaeger-thrift-compact
    port: 6831
    protocol: UDP
    targetPort: 6831
  - name: tempo-jaeger-thrift-binary
    port: 6832
    protocol: UDP
    targetPort: 6832
  - name: tempo-prom-metrics
    port: 3200
    protocol: TCP
    targetPort: 3200
  - name: jaeger-metrics
    port: 16687
    protocol: TCP
    targetPort: 16687
  - name: tempo-query-jaeger-ui
    port: 16686
    targetPort: 16686
  - name: tempo-jaeger-thrift-http
    port: 14268
    protocol: TCP
    targetPort: 14268
  - name: grpc-tempo-jaeger
    port: 14250
    protocol: TCP
    targetPort: 14250
  - name: tempo-zipkin
    port: 9411
    protocol: TCP
    targetPort: 9411
  - name: tempo-otlp-legacy
    port: 55680
    protocol: TCP
    targetPort: 55680
  - name: tempo-otlp-http-legacy
    port: 55681
    protocol: TCP
    targetPort: 55681
  - name: grpc-tempo-otlp
    port: 4317
    protocol: TCP
    targetPort: 4317
  - name: tempo-otlp-http
    port: 4318
    protocol: TCP
    targetPort: 4318
  - name: tempo-opencensus
    port: 55678
    protocol: TCP
    targetPort: 55678
  selector:
    app.kubernetes.io/name: tempo
    app.kubernetes.io/instance: tempo
---
# Source: tempo/templates/statefulset.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: tempo
  namespace: tempo
  labels:
    helm.sh/chart: tempo-1.24.4
    app.kubernetes.io/name: tempo
    app.kubernetes.io/instance: tempo
    app.kubernetes.io/version: "2.9.0"
    app.kubernetes.io/managed-by: Helm
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: tempo
      app.kubernetes.io/instance: tempo
  serviceName: tempo-headless
  template:
    metadata:
      labels:
        app.kubernetes.io/name: tempo
        app.kubernetes.io/instance: tempo
      annotations:
        checksum/config: fc9e07fe98f8d4639765dd059d30b68b28d8f46c569c2bbd357434ebad8632aa
    spec:
      serviceAccountName: tempo
      automountServiceAccountToken: true
      containers:
      - args:
        - -config.file=/conf/tempo.yaml
        - -mem-ballast-size-mbs=1024
        image: docker.io/grafana/tempo:2.9.0
        imagePullPolicy: IfNotPresent
        name: tempo
        ports:
        - containerPort: 3200
          name: prom-metrics
        - containerPort: 6831
          name: jaeger-thrift-c
          protocol: UDP
        - containerPort: 6832
          name: jaeger-thrift-b
          protocol: UDP
        - containerPort: 14268
          name: jaeger-thrift-h
        - containerPort: 14250
          name: jaeger-grpc
        - containerPort: 9411
          name: zipkin
        - containerPort: 55680
          name: otlp-legacy
        - containerPort: 4317
          name: otlp-grpc
        - containerPort: 55681
          name: otlp-httplegacy
        - containerPort: 4318
          name: otlp-http
        - containerPort: 55678
          name: opencensus
        livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /ready
              port: 3200
            initialDelaySeconds: 30
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 5
        readinessProbe:
            failureThreshold: 3
            httpGet:
              path: /ready
              port: 3200
            initialDelaySeconds: 20
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 5
        resources:
          {}
        env:
          - name: AWS_ACCESS_KEY_ID
            valueFrom:
              secretKeyRef:
                key: access_key
                name: tempo-s3-credentials
          - name: AWS_SECRET_ACCESS_KEY
            valueFrom:
              secretKeyRef:
                key: secret_key
                name: tempo-s3-credentials
        volumeMounts:
        - mountPath: /conf
          name: tempo-conf
        - mountPath: /var/tempo
          name: storage
      - args:
        - -config
        - /conf/tempo-query.yaml
        image: grafana/tempo-query:2.9.0
        imagePullPolicy: IfNotPresent
        name: tempo-query
        ports:
        - containerPort: 16686
          name: jaeger-ui
        - containerPort: 16687
          name: jaeger-metrics
        env:
        resources:
          {}
        volumeMounts:
        - mountPath: /conf
          name: tempo-query-conf
      securityContext:
        fsGroup: 10001
        runAsGroup: 10001
        runAsNonRoot: true
        runAsUser: 10001
      volumes:
      - configMap:
          name: tempo-query
        name: tempo-query-conf
      - configMap:
          name: tempo
        name: tempo-conf
  updateStrategy:
    type:
      RollingUpdate
  volumeClaimTemplates:
    - apiVersion: v1
      kind: PersistentVolumeClaim
      metadata:
        name: storage
        annotations:
          {}
      spec:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: "10Gi"
        storageClassName: standard
---
# Source: tempo/templates/ingress-tempo-query.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: tempo
  namespace: tempo
  labels:
    helm.sh/chart: tempo-1.24.4
    app.kubernetes.io/name: tempo
    app.kubernetes.io/instance: tempo
    app.kubernetes.io/version: "2.9.0"
    app.kubernetes.io/managed-by: Helm
spec:
  ingressClassName: nginx
  rules:
    - host: query.tempo.example.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: tempo
                port:
                  number: 16686
---
# Source: tempo/templates/servicemonitor.yaml
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: tempo
  namespace: tempo
  labels:
    app: tempo
    chart: tempo-1.24.4
    heritage: Helm
spec:
  selector:
    matchLabels:
      helm.sh/chart: tempo-1.24.4
      app.kubernetes.io/name: tempo
      app.kubernetes.io/instance: tempo
      app.kubernetes.io/version: "2.9.0"
      app.kubernetes.io/managed-by: Helm
  namespaceSelector:
    matchNames:
      - "tempo"
  endpoints:
    - port: tempo-prom-metrics
    - port: jaeger-metrics
