vpn: add option to disable

This commit is contained in:
Andrey Kartashov 2022-03-18 18:16:01 +07:00
parent a6128b144f
commit 95b85cff71
2 changed files with 19 additions and 0 deletions

View file

@ -14,6 +14,13 @@ spec:
name: vpn-client
spec:
hostNetwork: true
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: vpn
operator: Exists
volumes:
- name: vpn-conf
configMap:

View file

@ -20,3 +20,15 @@ $ kubectl --context=gullfaxi --namespace vpn \
create secret generic vpn-creds \
--from-file=creds=./creds
```
To disable:
```bash
kubectl --context=gullfaxi label nodes gullfaxi vpn-
```
To enable:
```bash
kubectl --context=gullfaxi label nodes gullfaxi vpn=""
```