{"id":16941305,"url":"https://github.com/iceber/thanos-chart","last_synced_at":"2026-05-16T21:32:22.748Z","repository":{"id":117571737,"uuid":"228554136","full_name":"Iceber/thanos-chart","owner":"Iceber","description":null,"archived":false,"fork":false,"pushed_at":"2019-12-19T02:54:14.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T06:43:14.931Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Smarty","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Iceber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-17T07:03:04.000Z","updated_at":"2023-05-10T05:25:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"0baf591e-0c0c-485e-b27e-a9cd966bdbf1","html_url":"https://github.com/Iceber/thanos-chart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Iceber/thanos-chart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iceber%2Fthanos-chart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iceber%2Fthanos-chart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iceber%2Fthanos-chart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iceber%2Fthanos-chart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Iceber","download_url":"https://codeload.github.com/Iceber/thanos-chart/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iceber%2Fthanos-chart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33119380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"ssl_error","status_checked_at":"2026-05-16T18:38:29.903Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T21:09:13.704Z","updated_at":"2026-05-16T21:32:22.733Z","avatar_url":"https://github.com/Iceber.png","language":"Smarty","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Thanos\n提供 query, store-gateway 组件的 helm chart  \n默认没有开启 store-gateway 组件\n\n---\n\n暂未实现 tls 相关功能，比如额外挂载卷等\n\n\n## 运行\n\n```\nhelm install -n \u003cnamespace\u003e -f values.yaml thanos ./thanos \n```\n## 更新\n\n```\nhelm upgrade -n \u003cnamespace\u003e -f values.yaml thanos ./thanos\n```\n\n## 删除\n\n```\nhelm uninstall -n \u003cnamespace\u003e thanos\n```\n\n\n## 配置 query 组件\n\n```\nquery:\n    logLevel: debug\n\n    replicaLabels: []\n    stores:\n      - dnssrv+_grpc._tcp.thanos-store-grpc-headless.prome.svc\n      - dnssrv+_grpc._tcp.prom-thanos-prometheus-prome-thanos-grpc-headless.prome.svc\n\n    service:\n      type: NodePort\n      nodePort: 30902\n```\n\n主要需要配置的是需要收集的 store api 和 replicaLabels\n\n```\n    replicaLabels: []\n    stores: []\n```\n\n#### replicaLabels 通过副本标签可以删除掉重复数据    \n\u003e replicaLabels 可以匹配 Prometheus 配置文件的 global 中 extraLabels 下的标签\n\n\n#### stores 可以使用 Headless Services，格式为\n```\ndnssrv+_grpc._tcp.\u003cservice-name\u003e.\u003cnamespace\u003e.svc\n```\n\n\u003e 如果一个 Namespace 下存在多个 store-api 集群服务则需要把他们都加入到 stores 参数中  \n\u003e 可以通过对这个提供 store-api 的集群增加标签，组建新的 headless service\n\n#### TODO （如果有这个需要的话):\n自动匹配指定标签，汇总 Namespace 下所有提供store-api的pod，组建新的服务\n\n## 使用 store-gateway\n#### 将对象存储的配置文件保存到 ConfigMap 中\n\n```\napiVersion: v1\nkind: ConfigMap\nmetadata:\n    name: thanos-objstore-s3-config\ndata:\n    s3.yml: |\n        type: S3\n        config:\n            bucket: \"def\"\n            endpoint: \"10.8.1.73:10110\"\n            access_key: \"adsf\"\n            secret_key: \"ddf\"\n            insecure: true\n```\n###### 具体的 Thanos 对象存储配置参考：https://thanos.io/storage.md\n#### 使用 [fakes3](https://github.com/jubos/fake-s3) 来进行 s3 存储测试\n#### 开启 store-gateway\n```\nstore:\n    enabled: true\n    logLevel: debug\n    objstore:\n        configMapName: \"thanos-objstore-s3-config\"\n        configFileName: \"s3.yml\"\n    grpcHeadless:\n        servicePort: 10901\n        annotations: {}\n```\n###### 自动创建 grpc 的 Headless Service\n\n## Configuration\nParameter | Description | Default\n--------- | ----------- | -------\n`image.repository` | `Thanos container 镜像仓库` | `thanosio/thanos`\n`image.tag` | `Thanos container 镜像标签` | `master-2019-12-14-bec86666`\n`image.pullPolicy` | `Thanos 镜像 pull policy` | `IfNotPresent`\n`query.name` | `Thanos query 容器名称` | `thanos-query`\n`query.replicaCount` | `Thanos query pods 副本数量` | 1\n`query.logLevel` | `Thanos query log level` | \"\"\n`query.podLabels` | `增加到 Thanos query pods 的标签` | {}\n`query.replicaLabels` | `Thanos query 用来区分 store-api 副本的标签` | []\n`query.stores` | `Thanos store api 的地址` | []\n`query.service.type` | `Thanos http service 类型` | ClusterIP\n`query.service.annotations` | `Thanos http service annotations` | {}\n`query.service.labels` | `Thanos http service labels` | {}\n`query.service.servicePort` | `Thanos http service servicePort` | 10902\n`query.service.nodePort` | `Thanos http service node port 当 query.service.type 为 NodePort 时才有效` | 0\n`query.resource` | `Thanso query pod resource request \u0026 limits` | {}\n`query.nodeSelector` | `Thanos query nodeSelector` | {}\n`query.toleration` | `Thanos query toleration` | {}\n`query.affinity` | `Thanos query toleration` | {}\n`store.enabled` | `是否开启Thanos store gateway` | false\n`store.name` | `Thanso store 容器名称` | \"thanos-store\"\n`sotre.logLevel` | `Thanos store log level\" | debug\n`store.replicaCount` | `Thanos store pods 副本数量` | 1\n`store.podLables` | `增加到 Thanos sotre pods 的标签` | {}\n`store.objstore.configFileName` | `Thanos store 对象存储配置文件名称` | \"\"\n`store.objstore.configMapName` | `Thanos store 对象存储配置文件的ConfigMap` | \"\"\n`store.grpcHeadless.servicePort` | `Thanos store grpc Headless Service port` | 10901\n`store.grpcHeadless.annotations` | `Thanos store grpc Headless Service annotations` | {}\n`store.resource` | `Thanos store pod resource reuqest \u0026 limits` | {}\n`sotre.nodeSelector` | `Thanos sotre nodeSelector` | {}\n`sotre.toleration` | `Thanos sotre toleration` | {}\n`sotre.affinity` | `Thanos sotre toleration` | {}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficeber%2Fthanos-chart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficeber%2Fthanos-chart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficeber%2Fthanos-chart/lists"}