-
Notifications
You must be signed in to change notification settings - Fork 0
/
trickster-aio.processed.yaml
139 lines (139 loc) · 4.48 KB
/
trickster-aio.processed.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
apiVersion: v1
items:
- apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
labels:
app: trickster
name: trickster
spec:
replicas: 1
selector:
app: trickster
strategy:
resources:
requests:
cpu: 20m
memory: 1Gi
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
triggers:
- type: ConfigChange
type: Rolling
template:
metadata:
labels:
app: trickster
name: trickster
spec:
containers:
- env:
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: tricksterio/trickster:latest
imagePullPolicy: IfNotPresent
name: trickster
volumeMounts:
- mountPath: /etc/trickster
name: cfg-volume
volumes:
- configMap:
items:
- key: trickster-conf
path: trickster.conf
name: trickster-conf
name: cfg-volume
- apiVersion: route.openshift.io/v1
kind: Route
metadata:
annotations:
openshift.io/host.generated: "true"
name: trickster
spec:
port:
targetPort: proxy
tls:
termination: edge
to:
kind: Service
name: trickster
weight: 100
wildcardPolicy: None
- apiVersion: v1
data:
trickster-conf: |-
[main]
# instance_id allows you to run multiple trickster processes on the same host and log to separate files
# Useful for baremetal, not so much for elastic deployments, so only uncomment if you really need it
#instance_id = 1
# Configuration options for the Proxy Server
[proxy_server]
# listen_port defines the port on which Trickster's Proxy server listens.
# since this is a proxy for Prometheus, we use 9090 by default, just like Prometheus does
listen_port = 9090
[cache]
# cache_type defines what kind of cache Trickster uses
# options are 'boltdb, 'filesystem', 'memory', and 'redis'. 'memory' is the default
cache_type = 'memory'
# record_ttl_secs defines the relative expiration of cached queries. default is 6 hours (21600 seconds)
record_ttl_secs = 21600
# Configuration options when using a Redis Cache
# [cache.redis]
# protocol defines the protocol for connecting to redis ('unix' or 'tcp') 'tcp' is default
# protocol = 'tcp'
# endpoint defines the fqdn+port or path to a unix socket file for connecting to redis
# default is 'redis:6379'
# endpoint = 'trickster-redis.${namespace}.svc.cluster.local:6379'
# Configuration options for mapping Origin(s)
[origins]
# The default origin
[origins.default]
# origin_url defines the URL of the origin. Default is http://prometheus:9090
origin_url = 'http://prometheus.bar.svc:9090'
# api path defines the path of the Prometheus API (usually '/api/v1')
api_path = '/api/v1'
# default_step defines the step (in seconds) of a query_range request if one is
# not provided by the client. This helps to correct improperly formed client requests.
default_step = 300
# max_value_age_secs defines the maximum age of specific datapoints in seconds. Default is 86400 (24 hours)
max_value_age_secs = 86400
# Configuration Options for Metrics Instrumentation
[metrics]
# listen_port defines the port that Trickster's metrics server listens on at /metrics
listen_port = 8082
# Configuration Options for Logging Instrumentation
[logging]
# log_level defines the verbosity of the logger. Possible values are 'debug', 'info', 'warn', 'error'
# default is info
log_level = 'info'
kind: ConfigMap
metadata:
labels:
app: trickster-conf
name: trickster-conf
- apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "8082"
prometheus.io/scrape: "true"
name: trickster
spec:
ports:
- name: proxy
port: 9090
targetPort: 9090
- name: metrics
port: 8082
targetPort: 8082
selector:
app: trickster
kind: List
metadata: {}