-
Notifications
You must be signed in to change notification settings - Fork 113
/
Copy pathmetrics-heapster.yaml
115 lines (113 loc) · 3.79 KB
/
metrics-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
#!/bin/bash
#
# Copyright 2014-2015 Red Hat, Inc. and/or its affiliates
# and other contributors as indicated by the @author tags.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apiVersion: "v1"
kind: "Template"
metadata:
name: metrics-heapster-deployer-template
annotations:
description: "Template for deploying a standalone Heapster for HPA. Requires cluster-admin 'metrics-deployer' service account and 'metrics-deployer' secret."
tags: "infrastructure"
labels:
metrics-infra: deployer
provider: openshift
component: deployer
objects:
-
apiVersion: v1
kind: Pod
metadata:
generateName: metrics-deployer-
spec:
containers:
- image: ${IMAGE_PREFIX}metrics-deployer:${IMAGE_VERSION}
name: deployer
volumeMounts:
- name: secret
mountPath: /secret
readOnly: true
- name: empty
mountPath: /etc/deploy
env:
- name: PROJECT
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: IMAGE_PREFIX
value: ${IMAGE_PREFIX}
- name: IMAGE_VERSION
value: ${IMAGE_VERSION}
- name: MODE
value: ${MODE}
- name: MASTER_URL
value: ${MASTER_URL}
- name: REDEPLOY
value: ${REDEPLOY}
- name: HEAPSTER_STANDALONE
value: "true"
- name: IGNORE_PREFLIGHT
value: ${IGNORE_PREFLIGHT}
- name: METRIC_RESOLUTION
value: ${METRIC_RESOLUTION}
- name: STARTUP_TIMEOUT
value: ${STARTUP_TIMEOUT}
dnsPolicy: ClusterFirst
restartPolicy: Never
serviceAccount: metrics-deployer
volumes:
- name: empty
emptyDir: {}
- name: secret
secret:
secretName: metrics-deployer
parameters:
-
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: "Internal URL for the master, for authentication retrieval"
name: MASTER_URL
value: "https://kubernetes.default.svc:443"
-
description: "If set to true the deployer will try and delete all the existing components before trying to redeploy."
name: REDEPLOY
value: "false"
-
description: "If set to true preflight checks will still run on deploy, but deploy will proceed even if the checks fail."
name: IGNORE_PREFLIGHT
value: "false"
-
description: "How often metrics should be gathered. Defaults value of '30s' for 30 seconds"
name: METRIC_RESOLUTION
value: "30s"
-
description: "Can be set to: 'preflight' to perform validation before a deployment; 'deploy' to perform an initial deployment; 'refresh' to delete and redeploy all components but to keep persisted data and routes; 'redeploy' to delete and redeploy everything (losing all data in the process); 'validate' to re-run validations after a deployment"
name: MODE
value: "deploy"
-
description: "How long in seconds we should wait until Heapster starts up before attempting a restart"
name: STARTUP_TIMEOUT
value: "500"