forked from rhobs/configuration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rhelemeter.libsonnet
77 lines (70 loc) · 1.96 KB
/
rhelemeter.libsonnet
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
(import 'github.com/openshift/telemeter/jsonnet/telemeter/server/rhelemeter-kubernetes.libsonnet') +
{
local config = self._config,
_config+:: {
namespace: 'rhelemeter',
rhelemeterServer+:: {
image: 'quay.io/app-sre/telemeter:82f71d3',
replicas: 3,
logLevel: 'warn',
oidcIssuer: error 'must provide telemeterForwardURL',
clientID: error 'must provide clientID',
clientSecret: error 'must provide clientSecret',
rhelemeterForwardURL: error 'must provide telemeterForwardURL',
rhelemeterTenantID: error 'must provide rhelemeterTenantID',
externalMtlsCa: error 'must provide externalMtlsCa',
externalMtlsKey: error 'must provide externalMtlsKey',
externalMtlsCrt: error 'must provide externalMtlsCrt',
},
},
rhelemeterServer+:: {
secret+: {
data+:: {
},
},
externalMtlsSecret+: {
data+:: {
},
},
deployment+: {
spec+: {
template+: {
spec+: {
containers: [
if c.name == 'rhelemeter-server' then c {
image: config.rhelemeterServer.image,
command+: [
'--log-level=' + config.rhelemeterServer.logLevel,
'--limit-bytes=5242880',
'--tenant-id=' + config.rhelemeterServer.rhelemeterTenantID,
'--forward-url=' + config.rhelemeterServer.rhelemeterForwardURL,
],
}
for c in super.containers
],
},
},
},
},
serviceMonitor+: {
metadata+: {
labels+: {
prometheus: 'app-sre',
},
},
spec+: {
namespaceSelector+: { matchNames: [config.namespace] },
endpoints: [
{
interval: '60s',
port: 'internal',
scheme: 'https',
tlsConfig: {
insecureSkipVerify: true,
},
},
],
},
},
},
}