-
Notifications
You must be signed in to change notification settings - Fork 117
/
heapster.yaml
121 lines (121 loc) · 4.03 KB
/
heapster.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
id: hawkular-heapster
kind: Template
apiVersion: v1
name: Hawkular Heapster Template
description: Configures a Heapster template to be used with Hawkular Metrics.
metadata:
name: hawkular-heapster
labels:
metrics-infra: heapster
parameters:
- description: Internal URL for the master, for authentication retrieval
name: MASTER_URL
value: https://kubernetes.default.svc:443
- description: Specify prefix for metrics components; e.g. for "openshift/origin-metrics-deployer:v1.1",
set prefix "openshift/origin-"
name: IMAGE_PREFIX
value: openshift/origin-
- description: Specify version for metrics components; e.g. for "openshift/origin-metrics-deployer:v1.1",
set version "v1.1"
name: IMAGE_VERSION
value: "latest"
- description: The identifier used when calcuating node level metric ids
name: NODE_ID
value: nodename
- description: "How often metrics should be gathered. Defaults value of '30s' for 30 seconds"
name: METRIC_RESOLUTION
value: "30s"
- description: How long in seconds we should wait until Heapster starts up before attempting a restart
name: STARTUP_TIMEOUT
value: "500"
objects:
- apiVersion: v1
kind: ServiceAccount
metadata:
name: heapster
labels:
metrics-infra: support
secrets:
- name: heapster-secrets
- name: hawkular-metrics-account
- apiVersion: v1
kind: Service
metadata:
name: heapster
labels:
metrics-infra: heapster
name: heapster
annotations:
"service.alpha.openshift.io/serving-cert-secret-name": heapster-certs
spec:
selector:
name: heapster
ports:
- port: 80
targetPort: http-endpoint
- apiVersion: v1
kind: ReplicationController
metadata:
name: heapster
labels:
metrics-infra: heapster
name: heapster
spec:
selector:
name: heapster
replicas: 1
template:
version: v1
metadata:
labels:
metrics-infra: heapster
name: heapster
spec:
containers:
- image: "${IMAGE_PREFIX}metrics-heapster:${IMAGE_VERSION}"
name: heapster
ports:
- name: http-endpoint
containerPort: 8082
command:
- "heapster-wrapper.sh"
- "--wrapper.username_file=/hawkular-account/hawkular-metrics.username"
- "--wrapper.password_file=/hawkular-account/hawkular-metrics.password"
- "--wrapper.allowed_users_file=/secrets/heapster.allowed-users"
- "--wrapper.endpoint_check=https://hawkular-metrics:443/hawkular/metrics/status"
- "--source=kubernetes.summary_api:${MASTER_URL}?useServiceAccount=true&kubeletHttps=true&kubeletPort=10250"
- "--sink=hawkular:https://hawkular-metrics:443?tenant=_system&labelToTenant=namespace_name&labelNodeId=${NODE_ID}&caCert=/secrets/heapster.tls.truststore&user=%username%&pass=%password%&filter=label(container_name:^system.slice.*|^user.slice)"
- "--tls_cert=/heapster-certs/tls.crt"
- "--tls_key=/heapster-certs/tls.key"
- "--tls_client_ca=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
- "--allowed_users=%allowed_users%"
- "--metric_resolution=${METRIC_RESOLUTION}"
env:
- name: STARTUP_TIMEOUT
value: ${STARTUP_TIMEOUT}
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
volumeMounts:
- name: heapster-secrets
mountPath: "/secrets"
- name: hawkular-metrics-account
mountPath: "/hawkular-account"
- name: heapster-certs
mountPath: "/heapster-certs"
readinessProbe:
exec:
command:
- "/opt/heapster-readiness.sh"
volumes:
- name: heapster-secrets
secret:
secretName: heapster-secrets
- name: heapster-certs
secret:
secretName: heapster-certs
- name: hawkular-metrics-account
secret:
secretName: hawkular-metrics-account
serviceAccount: heapster