summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-cluster/kube-router/files/kube-router.initd')
-rw-r--r--sys-cluster/kube-router/files/kube-router.initd12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys-cluster/kube-router/files/kube-router.initd b/sys-cluster/kube-router/files/kube-router.initd
index 844b951bd837..9b96ec024f66 100644
--- a/sys-cluster/kube-router/files/kube-router.initd
+++ b/sys-cluster/kube-router/files/kube-router.initd
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="Kubernetes routing engine"
@@ -20,3 +20,13 @@ extra_commands="clear"
clear() {
"${command}" --cleanup-config
}
+
+if [[ -n "${KUBE_ROUTER_HEALTHCHECK_URI}" ]]; then
+ healthcheck_delay=60
+ healthcheck_timer=30
+
+ healthcheck() {
+ command -v wget || return 0
+ wget -Oq- "${KUBE_ROUTER_HEALTHCHECK_URI}"
+ }
+fi