summaryrefslogtreecommitdiff
path: root/sys-cluster/kube-router/files/kube-router.initd
blob: 844b951bd837848ed9a3124a44375247a8d0c475 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/sbin/openrc-run
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

description="Kubernetes routing engine"
supervisor=supervise-daemon
command="/usr/bin/kube-router"
error_log='/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log'
pidfile="${pidfile:-/run/${RC_SVCNAME}.pid}"

command_args="--master=${K8S_APISERVER} --kubeconfig=${KUBECONFIG} \
              --run-service-proxy=${RUN_PROXY:-false} \
              --run-firewall=${RUN_FIREWALL:-false} \
              --run-router=${RUN_ROUTER:-false} \
              ${HOSTNAME:+--hostname-override=}${HOSTNAME} \
              ${EXTRA_ARGS}"

extra_commands="clear"

clear() {
    "${command}" --cleanup-config
}