1 Star 0 Fork 4

Shiro/thanos-install

forked from cuiliang/thanos-install 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
thanos-rule.yaml 2.21 KB
一键复制 编辑 原始数据 按行查看 历史
cuiliang 提交于 2023-02-20 16:23 . 更新组件版本
apiVersion: v1
kind: Service
metadata:
labels:
app: thanos-rule
name: thanos-rule
namespace: thanos
spec:
clusterIP: None
ports:
- name: grpc
port: 10901
targetPort: grpc
- name: http
port: 10902
targetPort: http
selector:
app: thanos-rule
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app: thanos-rule
name: thanos-rule
namespace: thanos
spec:
replicas: 2
selector:
matchLabels:
app: thanos-rule
serviceName: thanos-rule
podManagementPolicy: Parallel
template:
metadata:
labels:
app: thanos-rule
spec:
containers:
- name: thanos-rule
args:
- rule
- --grpc-address=0.0.0.0:10901
- --http-address=0.0.0.0:10902
- --rule-file=/etc/thanos/rule/*.yaml
- --data-dir=/data/thanos/rule
- --label=rule_replica="$(NAME)"
- --alert.label-drop=rule_replica
- --query=dnssrv+_http._tcp.thanos-query.thanos.svc.cluster.local
- --alertmanagers.url=http://alertmanager-endpoints:30011
env:
- name: NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
image: harbor.com/prometheus/thanos:v0.30.2
imagePullPolicy: IfNotPresent
resources:
limits:
memory: "4Gi"
cpu: "2"
requests:
memory: "128Mi"
cpu: "100m"
readinessProbe:
failureThreshold: 18
httpGet:
path: /-/ready
port: http
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 5
livenessProbe:
failureThreshold: 24
httpGet:
path: /-/healthy
port: http
scheme: HTTP
periodSeconds: 5
ports:
- containerPort: 10901
name: grpc
- containerPort: 10902
name: http
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- name: prometheus-rule
mountPath: /etc/thanos/rule
volumes:
- name: prometheus-rule
configMap:
name: prometheus-rule
securityContext:
runAsUser: 0
runAsGroup: 0
fsGroup: 0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shunzi115/thanos-install.git
[email protected]:shunzi115/thanos-install.git
shunzi115
thanos-install
thanos-install
master

搜索帮助