-
Notifications
You must be signed in to change notification settings - Fork 68
/
rhelemeter-template.jsonnet
55 lines (53 loc) · 2 KB
/
rhelemeter-template.jsonnet
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
local rhelemeter = (import 'rhelemeter.libsonnet') {
_config+:: {
namespace: '${NAMESPACE}',
rhelemeterServer+:: {
image: '${IMAGE}:${IMAGE_TAG}',
replicas: '${{REPLICAS}}',
logLevel: '${RHELEMETER_LOG_LEVEL}',
rhelemeterForwardURL: '${RHELEMETER_FORWARD_URL}',
rhelemeterTenantID: '${RHELEMETER_TENANT_ID}',
oidcIssuer: '${RHELEMETER_OIDC_ISSUER}',
clientID: '${RHELEMETER_CLIENT_ID}',
clientSecret: '${RHELEMETER_CLIENT_SECRET}',
clientInfoPSK: '${RHELEMETER_CLIENT_INFO_PSK}',
whitelist+: (import '../configuration/rhelemeter/metrics.json'),
resourceLimits:: {
cpu: '${RHELEMETER_SERVER_CPU_LIMIT}',
memory: '${RHELEMETER_SERVER_MEMORY_LIMIT}',
},
resourceRequests:: {
cpu: '${RHELEMETER_SERVER_CPU_REQUEST}',
memory: '${RHELEMETER_SERVER_MEMORY_REQUEST}',
},
},
},
};
{
apiVersion: 'template.openshift.io/v1',
kind: 'Template',
metadata: { name: 'rhelemeter' },
objects: [
rhelemeter.rhelemeterServer[name] {
metadata+: { namespace:: 'hidden' },
}
for name in std.objectFields(rhelemeter.rhelemeterServer)
],
parameters: [
{ name: 'NAMESPACE', value: 'rhelemeter' },
{ name: 'IMAGE_TAG', value: '5923762' },
{ name: 'IMAGE', value: 'quay.io/app-sre/telemeter' },
{ name: 'REPLICAS', value: '2' },
{ name: 'RHELEMETER_TENANT_ID', value: 'rhel' },
{ name: 'RHELEMETER_FORWARD_URL', value: '' },
{ name: 'RHELEMETER_OIDC_ISSUER', value: 'https://sso.redhat.com/auth/realms/redhat-external' },
{ name: 'RHELEMETER_CLIENT_ID', value: '' },
{ name: 'RHELEMETER_CLIENT_SECRET', value: '' },
{ name: 'RHELEMETER_CLIENT_INFO_PSK', value: '' },
{ name: 'RHELEMETER_LOG_LEVEL', value: 'warn' },
{ name: 'RHELEMETER_SERVER_CPU_LIMIT', value: '1' },
{ name: 'RHELEMETER_SERVER_CPU_REQUEST', value: '100m' },
{ name: 'RHELEMETER_SERVER_MEMORY_LIMIT', value: '1Gi' },
{ name: 'RHELEMETER_SERVER_MEMORY_REQUEST', value: '500Mi' },
],
}