Merge "Add workaround for tunnel connectivity" into 1.15
[infra/stack/kubernetes.git] / apps / ceph / kubespray / playbooks / roles / install / templates / ping-tunnel-workaround.yaml.j2
diff --git a/apps/ceph/kubespray/playbooks/roles/install/templates/ping-tunnel-workaround.yaml.j2 b/apps/ceph/kubespray/playbooks/roles/install/templates/ping-tunnel-workaround.yaml.j2
new file mode 100644 (file)
index 0000000..089f729
--- /dev/null
@@ -0,0 +1,29 @@
+apiVersion: apps/v1
+kind: DaemonSet
+metadata:
+  name: pingtunnelworkaround
+  namespace: "{{ rook_namespace }}"
+  labels:
+    app: pingtunnelworkaround
+spec:
+  selector:
+    matchLabels:
+      app: pingtunnelworkaround
+  template:
+    metadata:
+      labels:
+        app: pingtunnelworkaround
+    spec:
+      tolerations:
+      # this toleration is to have the daemonset runnable on master nodes
+      # remove it if your masters can't run pods
+      - key: node-role.kubernetes.io/master
+        effect: NoSchedule
+      nodeSelector:
+        kubernetes.io/os: linux
+      hostNetwork: true
+      containers:
+      - name: busybox
+        image: {{ busybox_repository }}/library/busybox:{{ busybox_version }}
+        command: ["/bin/sh"]
+        args:  ["-c", "while true ; do ip route | grep tunl0 | awk -F/ '{print $1}' | xargs -n 1 ping -c 1; sleep 5; done"]