43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: skubelb
|
|
namespace: skubelb
|
|
labels:
|
|
k8s-app: skubelb
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
name: skubelb
|
|
template:
|
|
metadata:
|
|
labels:
|
|
name: skubelb
|
|
spec:
|
|
tolerations:
|
|
# these tolerations are to have the daemonset runnable on control plane nodes
|
|
# remove them if your control plane nodes should not run pods
|
|
- key: node-role.kubernetes.io/control-plane
|
|
operator: Exists
|
|
effect: NoSchedule
|
|
- key: node-role.kubernetes.io/master
|
|
operator: Exists
|
|
effect: NoSchedule
|
|
containers:
|
|
- name: skubelb
|
|
image: alpine/curl:latest
|
|
command: ['sh', '-c', 'echo "Wait for heat death of universe" && sleep 999999d']
|
|
lifecycle:
|
|
postStart:
|
|
exec:
|
|
command: ['curl', '-X', 'POST', '10.128.0.2:8888/register']
|
|
preStop:
|
|
exec:
|
|
command: ['curl', '-X', 'DELETE', '10.128.0.2:8888/register']
|
|
resources:
|
|
limits:
|
|
memory: 200Mi
|
|
requests:
|
|
cpu: 10m
|
|
memory: 100Mi
|
|
terminationGracePeriodSeconds: 30 |