-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathdaemonset.yaml
37 lines (37 loc) · 1.07 KB
/
daemonset.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
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: k8s-spot-termination-handler
namespace: kube-system
labels:
app: k8s-spot-termination-handler
spec:
template:
metadata:
name: k8s-spot-termination-handler
labels:
app: k8s-spot-termination-handler
spec:
# Uncomment the following line if using RBAC
# serviceAccountName: k8s-spot-termination-handler
containers:
- name: k8s-spot-termination-handler
image: quay.io/pusher/k8s-spot-termination-handler:v0.1.0
imagePullPolicy: IfNotPresent
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
# Parameters to drain commmand can be adjusted
- name: DRAIN_PARAMETERS
value: '--grace-period=120 --force --ignore-daemonsets'
resources:
requests:
cpu: 5m
memory: 20Mi
limits:
cpu: 100m
memory: 100Mi
nodeSelector:
"node-role.kubernetes.io/spot-worker": "true"