使用Helm部署Tempo

原文链接:使用Helm部署Tempo

官方向导

主要参考 Deploy Tempo with HelmGet started with Grafana Tempo using the Helm chart 来部署,注意区分 tempo-distributed Helm charttempo Helm chart, 一般来说,本地测试使用 tempo Helm chart, 而生产环境可以使用 Tempo 的微服务部署方式 tempo-distributed.

自定义配置部署

我们可以创建一个 自定义配置文件, 比如 custom.yaml, 来部署, 让后在部署时使用命令 -f custom.yaml 来指定配置文件, 而不是使用默认的 values.yaml

helm -n tempo-test install tempo grafana/tempo -f custom.yaml

custom.yaml 配置文件

---
server:
  # -- HTTP server listen port
  http_listen_port: 3100


tempo:
  repository: grafana/tempo
  tag: ""
  pullPolicy: IfNotPresent
  ## Optionally specify an array of imagePullSecrets.
  ## Secrets must be manually created in the namespace.
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
  ##
  # pullSecrets:
  #   - myRegistryKeySecretName

  updateStrategy: RollingUpdate
  resources: {}
  #  requests:
  #    cpu: 1000m
  #    memory: 4Gi
  #  limits:
  #    cpu: 2000m
  #    memory: 6Gi

  memBallastSizeMbs: 1024
  multitenancyEnabled: false
  # -- If true, Tempo will report anonymous usage data about the shape of a deployment to Grafana Labs
  reportingEnabled: true
  metricsGenerator:
    # -- If true, enables Tempo's metrics generator (https://grafana.com/docs/tempo/next/metrics-generator/)
    enabled: false
    remoteWriteUrl: "http://prometheus.monitoring:9090/api/v1/write"
  # -- Configuration options for the ingester
  ingester: {}
  # -- Configuration options for the querier
  querier: {}
  # -- Configuration options for the query-fronted
  queryFrontend: {}
  retention: 24h
  # Global overrides
  global_overrides:
    per_tenant_override_config: /conf/overrides.yaml
  overrides: {}

storage:
  trace:
    backend: local
    local:
      path: /var/tempo/traces
    wal:
      path: /var/tempo/wal

# https://github.com/rancher/local-path-provisioner
persistence:
  enabled: true
  storageClassName: local-path
  accessModes:
    - ReadWriteOnce
  size: 1Gi

securityContext:
  runAsUser: 1000
  runAsGroup: 1000
  fsGroup: 2000

tempoQuery:
  repository: grafana/tempo-query
  tag: null
  pullPolicy: IfNotPresent
  enabled: true

traces:
  otlp:
    grpc:
      enabled: false
    http:
      enabled: true
  zipkin:
    enabled: false
  jaeger:
    thriftHttp:
      enabled: false
  opencensus:
    enabled: false

我们可以看到在 Tempo templates/statefulset.yaml 里的 persistence 的配置是 PersistentVolumeClaim (pvc)
在这里插入图片描述

那么我们就需要有相应的 pv 制备器(provisioner), 这里我们本地部署一般可以使用 local-path-provisioner 制备器

# https://github.com/rancher/local-path-provisioner
persistence:
  enabled: true
  storageClassName: local-path
  accessModes:
    - ReadWriteOnce
  size: 1Gi

安装之前确保添加了所需要的 repository, 可以使用下面的命令添加和确认:

helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
helm repo list -n tempo-test

执行安装

 helm -n tempo-test install tempo grafana/tempo -f custom.yaml

在这里插入图片描述

可以看到相应的 pvc 和 pod 被创建出来了
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值