Add workaround for tunnel connectivity
[infra/stack/kubernetes.git] / apps / ceph / kubespray / playbooks / roles / install / templates / ping-tunnel-workaround.yaml.j2
1 apiVersion: apps/v1
2 kind: DaemonSet
3 metadata:
4   name: pingtunnelworkaround
5   namespace: "{{ rook_namespace }}"
6   labels:
7     app: pingtunnelworkaround
8 spec:
9   selector:
10     matchLabels:
11       app: pingtunnelworkaround
12   template:
13     metadata:
14       labels:
15         app: pingtunnelworkaround
16     spec:
17       tolerations:
18       # this toleration is to have the daemonset runnable on master nodes
19       # remove it if your masters can't run pods
20       - key: node-role.kubernetes.io/master
21         effect: NoSchedule
22       nodeSelector:
23         kubernetes.io/os: linux
24       hostNetwork: true
25       containers:
26       - name: busybox
27         image: {{ busybox_repository }}/library/busybox:{{ busybox_version }}
28         command: ["/bin/sh"]
29         args:  ["-c", "while true ; do ip route | grep tunl0 | awk -F/ '{print $1}' | xargs -n 1 ping -c 1; sleep 5; done"]