mirror of
https://github.com/amkartashov/gf-k8s.git
synced 2026-01-11 01:49:44 +00:00
vpn: add option to disable
This commit is contained in:
parent
a6128b144f
commit
95b85cff71
2 changed files with 19 additions and 0 deletions
|
|
@ -14,6 +14,13 @@ spec:
|
||||||
name: vpn-client
|
name: vpn-client
|
||||||
spec:
|
spec:
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: vpn
|
||||||
|
operator: Exists
|
||||||
volumes:
|
volumes:
|
||||||
- name: vpn-conf
|
- name: vpn-conf
|
||||||
configMap:
|
configMap:
|
||||||
|
|
|
||||||
|
|
@ -20,3 +20,15 @@ $ kubectl --context=gullfaxi --namespace vpn \
|
||||||
create secret generic vpn-creds \
|
create secret generic vpn-creds \
|
||||||
--from-file=creds=./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=""
|
||||||
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue