-
Notifications
You must be signed in to change notification settings - Fork 2
/
daemonset-reserved-resources-recommender-containerd.yaml
157 lines (155 loc) · 4.89 KB
/
daemonset-reserved-resources-recommender-containerd.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
component: reserved-resources-recommender-containerd
gardener.cloud/role: monitoring
name: reserved-resources-recommender-containerd
spec:
revisionHistoryLimit: 10
selector:
matchLabels:
component: reserved-resources-recommender
template:
metadata:
labels:
component: reserved-resources-recommender
gardener.cloud/role: monitoring
networking.gardener.cloud/from-seed: allowed
networking.gardener.cloud/to-public-networks: allowed
spec:
automountServiceAccountToken: false
# priorityClassName: reserved-resources-recommender
nodeSelector:
# change to any worker pool
# worker.gardener.cloud/pool: cpu-worker
worker.gardener.cloud/cri-name: containerd
containers:
- image: eu.gcr.io/gardener-project/gardener/reserved-resources-recommender:latest
imagePullPolicy: Always
name: reconciler
env:
- name: PERIOD
value: "30s"
- name: MEMORY_SAFETY_MARGIN_ABSOLUTE
value: 400Mi
- name: CGROUPS_HIERARCHY_ROOT
value: "/sys/fs/cgroup"
- name: CGROUPS_CONTAINERD_ROOT
value: "system.slice/containerd.service"
- name: CGROUPS_KUBELET_ROOT
value: "system.slice/kubelet.service"
# also adjust Volume if this is changed
- name: KUBELET_DIRECTORY
value: "/var/lib/kubelet"
- name: ENFORCE_RECOMMENDATION
value: "false"
- name: MINIMUM_RESERVED_MEMORY
value: "1Gi"
# no liveness probe to make sure that pod is not killed under CPU pressure situations --> should still be able to make adjustments on cgroups
# livenessProbe:
# failureThreshold: 3
# httpGet:
# path: /metrics
# port: 16911
# scheme: HTTP
# initialDelaySeconds: 5
# periodSeconds: 10
# successThreshold: 1
# timeoutSeconds: 5
ports:
- containerPort: 16911
hostPort: 16911
name: scrape
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /metrics
port: 16911
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
resources:
requests:
memory: "30Mi"
cpu: "40m"
# limits:
# memory: "60Mi"
# cpu: "40m"
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
securityContext:
privileged: true
runAsUser: 0
volumeMounts:
- name: kubelet
mountPath: /var/lib/kubelet
readOnly: true
- name: cgroup-hierarchy
mountPath: /sys/fs/cgroup
readOnly: true
- name: dev
mountPath: /dev
readOnly: true
- name: containerd-root
mountPath: /var/lib/containerd
readOnly: true
- name: containerd-state
mountPath: /run/containerd
readOnly: true
- name: pod-logs
mountPath: /var/log/pods
readOnly: true
dnsPolicy: ClusterFirst
hostNetwork: true
hostPID: true
# priorityClassName: system-cluster-critical
restartPolicy: Always
schedulerName: default-scheduler
# serviceAccountName: better-resource-reservations
terminationGracePeriodSeconds: 30
tolerations:
- effect: NoExecute
key: node.kubernetes.io/not-ready
operator: Exists
tolerationSeconds: 300
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 300
- effect: NoExecute
key: pool.worker.gardener.cloud/dedicated-for
operator: Equal
value: etcd
volumes:
- name: kubelet
hostPath:
path: /var/lib/kubelet
type: "Directory"
- name: cgroup-hierarchy
hostPath:
path: /sys/fs/cgroup
type: "Directory"
- name: dev
hostPath:
path: /dev
type: "Directory"
- name: containerd-root
hostPath:
path: /var/lib/containerd
type: "Directory"
- name: containerd-state
hostPath:
path: /run/containerd
type: "Directory"
- name: pod-logs
hostPath:
path: /var/log/pods
type: "Directory"
updateStrategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate