/
thanos-ruler.yaml
171 lines (171 loc) · 4.89 KB
/
thanos-ruler.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
apiVersion: monitoring.coreos.com/v1
kind: ThanosRuler
metadata:
labels:
thanosRulerName: user-workload
name: user-workload
namespace: openshift-user-workload-monitoring
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/name: thanos-ruler
thanos-ruler: user-workload
namespaces:
- openshift-user-workload-monitoring
topologyKey: kubernetes.io/hostname
alertmanagersConfig:
key: alertmanagers.yaml
name: thanos-ruler-alertmanagers-config
containers:
- name: thanos-ruler
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- mountPath: /etc/tls/private
name: secret-thanos-ruler-tls
- mountPath: /etc/tls/grpc
name: secret-grpc-tls
- mountPath: /etc/prometheus/configmaps/serving-certs-ca-bundle
name: serving-certs-ca-bundle
- args:
- -provider=openshift
- -https-address=:9091
- -http-address=
- -email-domain=*
- -upstream=http://localhost:10902
- '-openshift-sar={"resource": "namespaces", "verb": "get"}'
- '-openshift-delegate-urls={"/": {"resource": "namespaces", "verb": "get"}}'
- -tls-cert=/etc/tls/private/tls.crt
- -tls-key=/etc/tls/private/tls.key
- -client-secret-file=/var/run/secrets/kubernetes.io/serviceaccount/token
- -cookie-secret-file=/etc/proxy/secrets/session_secret
- -openshift-service-account=thanos-ruler
- -openshift-ca=/etc/pki/tls/cert.pem
- -openshift-ca=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
env:
- name: HTTP_PROXY
value: ""
- name: HTTPS_PROXY
value: ""
- name: NO_PROXY
value: ""
image: quay.io/openshift/oauth-proxy:latest
name: thanos-ruler-proxy
ports:
- containerPort: 9091
name: web
resources:
requests:
cpu: 1m
memory: 12Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- mountPath: /etc/tls/private
name: secret-thanos-ruler-tls
- mountPath: /etc/proxy/secrets
name: secret-thanos-ruler-oauth-cookie
- args:
- --secure-listen-address=0.0.0.0:9092
- --upstream=http://127.0.0.1:10902
- --config-file=/etc/kube-rbac-proxy/config.yaml
- --tls-cert-file=/etc/tls/private/tls.crt
- --tls-private-key-file=/etc/tls/private/tls.key
- --client-ca-file=/etc/tls/client/client-ca.crt
- --logtostderr=true
- --allow-paths=/metrics
image: quay.io/openshift/origin-kube-rbac-proxy:latest
name: kube-rbac-proxy-metrics
ports:
- containerPort: 9092
name: metrics
resources:
requests:
cpu: 1m
memory: 15Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
terminationMessagePolicy: FallbackToLogsOnError
volumeMounts:
- mountPath: /etc/tls/private
name: secret-thanos-ruler-tls
- mountPath: /etc/kube-rbac-proxy
name: secret-thanos-ruler-kube-rbac-proxy-metrics
- mountPath: /etc/tls/client
name: metrics-client-ca
readOnly: true
enforcedNamespaceLabel: namespace
grpcServerTlsConfig:
caFile: /etc/tls/grpc/ca.crt
certFile: /etc/tls/grpc/server.crt
keyFile: /etc/tls/grpc/server.key
image: quay.io/thanos/thanos:v0.30.2
listenLocal: true
podMetadata:
annotations:
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
priorityClassName: openshift-user-critical
queryConfig:
key: query.yaml
name: thanos-ruler-query-config
replicas: 2
resources:
requests:
cpu: 1m
memory: 21Mi
ruleNamespaceSelector:
matchExpressions:
- key: openshift.io/cluster-monitoring
operator: NotIn
values:
- "true"
- key: openshift.io/user-monitoring
operator: NotIn
values:
- "false"
ruleSelector:
matchExpressions:
- key: openshift.io/prometheus-rule-evaluation-scope
operator: NotIn
values:
- leaf-prometheus
securityContext:
fsGroup: 65534
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
serviceAccountName: thanos-ruler
volumes:
- configmap:
items:
- key: service-ca.crt
path: service-ca.crt
name: serving-certs-ca-bundle
name: serving-certs-ca-bundle
- name: secret-thanos-ruler-tls
secret:
secretName: thanos-ruler-tls
- name: secret-thanos-ruler-oauth-cookie
secret:
secretName: thanos-ruler-oauth-cookie
- name: secret-thanos-ruler-kube-rbac-proxy-metrics
secret:
secretName: thanos-ruler-kube-rbac-proxy-metrics
- configMap:
name: metrics-client-ca
name: metrics-client-ca