2023-01-27 21:37:20 +00:00
# Copyright (c) Tailscale Inc & AUTHORS
# SPDX-License-Identifier: BSD-3-Clause
2021-10-12 21:24:07 +00:00
2022-07-01 03:09:09 +00:00
TS_ROUTES ?= ""
2021-10-12 21:24:07 +00:00
SA_NAME ?= tailscale
2022-07-01 03:05:49 +00:00
TS_KUBE_SECRET ?= tailscale
2021-10-12 21:24:07 +00:00
rbac :
2022-06-06 19:43:23 +00:00
@sed -e " s;{{TS_KUBE_SECRET}}; $( TS_KUBE_SECRET) ;g " role.yaml | kubectl apply -f -
2021-10-12 21:24:07 +00:00
@sed -e " s;{{SA_NAME}}; $( SA_NAME) ;g " rolebinding.yaml | kubectl apply -f -
@sed -e " s;{{SA_NAME}}; $( SA_NAME) ;g " sa.yaml | kubectl apply -f -
sidecar :
@kubectl delete -f sidecar.yaml --ignore-not-found --grace-period= 0
2022-06-06 19:43:23 +00:00
@sed -e " s;{{TS_KUBE_SECRET}}; $( TS_KUBE_SECRET) ;g " sidecar.yaml | sed -e " s;{{SA_NAME}}; $( SA_NAME) ;g " | kubectl create -f-
2021-10-12 21:24:07 +00:00
userspace-sidecar :
@kubectl delete -f userspace-sidecar.yaml --ignore-not-found --grace-period= 0
2022-06-06 19:43:23 +00:00
@sed -e " s;{{TS_KUBE_SECRET}}; $( TS_KUBE_SECRET) ;g " userspace-sidecar.yaml | sed -e " s;{{SA_NAME}}; $( SA_NAME) ;g " | kubectl create -f-
2021-10-12 21:24:07 +00:00
proxy :
2022-06-06 19:43:23 +00:00
kubectl delete -f proxy.yaml --ignore-not-found --grace-period= 0
sed -e " s;{{TS_KUBE_SECRET}}; $( TS_KUBE_SECRET) ;g " proxy.yaml | sed -e " s;{{SA_NAME}}; $( SA_NAME) ;g " | sed -e " s;{{TS_DEST_IP}}; $( TS_DEST_IP) ;g " | kubectl create -f-
2021-10-16 22:17:36 +00:00
subnet-router :
@kubectl delete -f subnet.yaml --ignore-not-found --grace-period= 0
2022-06-06 19:43:23 +00:00
@sed -e " s;{{TS_KUBE_SECRET}}; $( TS_KUBE_SECRET) ;g " subnet.yaml | sed -e " s;{{SA_NAME}}; $( SA_NAME) ;g " | sed -e " s;{{TS_ROUTES}}; $( TS_ROUTES) ;g " | kubectl create -f-