-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.yaml
68 lines (66 loc) · 1.68 KB
/
deployment.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
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: kube-pool-manager
namespace: kube-system
labels:
app: kube-pool-manager
spec:
replicas: 2
selector:
matchLabels:
app: kube-pool-manager
template:
metadata:
labels:
app: kube-pool-manager
annotations:
prometheus.io/scrape: "true"
prometheus.io/path: /metrics
prometheus.io/port: "8080"
spec:
serviceAccountName: kube-pool-manager
containers:
- name: kube-pool-manager
image: webdevops/kube-pool-manager:latest
imagePullPolicy: Always
env:
- name: CONFIG
value: "/config/pools.yaml"
# Instance
- name: INSTANCE_NODENAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: INSTANCE_POD
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: INSTANCE_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
capabilities:
drop: ['ALL']
ports:
- containerPort: 8080
name: http-metrics
protocol: TCP
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 1m
memory: 100Mi
volumeMounts:
- name: config
mountPath: /config
volumes:
- name: config
configMap:
name: kube-pool-manager