diff --git a/cluster/saltbase/salt/monit/init.sls b/cluster/saltbase/salt/monit/init.sls index a53ada3667a..e51300684a5 100644 --- a/cluster/saltbase/salt/monit/init.sls +++ b/cluster/saltbase/salt/monit/init.sls @@ -30,14 +30,22 @@ monit: - user: root - group: root - mode: 644 + +/etc/monit/conf.d/kube-proxy: + file: + - managed + - source: salt://monit/kube-proxy + - user: root + - group: root + - mode: 644 {% endif %} monit-service: service: - running - - name: monit + - name: monit - watch: - - pkg: monit + - pkg: monit - file: /etc/monit/conf.d/* {% endif %} diff --git a/cluster/saltbase/salt/monit/kube-proxy b/cluster/saltbase/salt/monit/kube-proxy new file mode 100644 index 00000000000..ede37c4cfa9 --- /dev/null +++ b/cluster/saltbase/salt/monit/kube-proxy @@ -0,0 +1,9 @@ +check process kube-proxy with pidfile /var/run/kube-proxy.pid +group kube-proxy +start program = "/etc/init.d/kube-proxy start" +stop program = "/etc/init.d/kube-proxy stop" +if does not exist then restart +if failed port 10249 + protocol HTTP request "/healthz" + with timeout 10 seconds + then restart