-
Notifications
You must be signed in to change notification settings - Fork 0
/
wg-easy-deploy.yml
71 lines (71 loc) · 1.67 KB
/
wg-easy-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
kind: Deployment
apiVersion: apps/v1
metadata:
name: wg-easy
labels:
app: wg-easy
part-of: wg-easy
spec:
replicas: 1
selector:
matchLabels:
app: wg-easy
part-of: wg-easy
template:
metadata:
labels:
app: wg-easy
part-of: wg-easy
spec:
nodeName: k3s-master01
securityContext:
sysctls:
- name: net.ipv4.conf.all.src_valid_mark
value: "1"
- name: net.ipv4.ip_forward
value: "1"
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: disktype
operator: In
values:
- ssd
containers:
- name: wg-easy
securityContext:
capabilities:
add:
- NET_ADMIN
- SYS_MODULE
image: weejewel/wg-easy:7
ports:
- name: wg-easy
containerPort: 51820
protocol: UDP
- name: wg-easy-tcp
containerPort: 51821
protocol: TCP
env:
- name: WG_HOST
value: "wireguard.<path:apps-kv/data/general#DN>"
- name: WG_PORT
value: "51820"
- name: WG_PERSISTENT_KEEPALIVE
value: "25"
- name: WG_DEFAULT_DNS
value: "192.168.1.2"
- name: WG_ALLOWED_IPS
value: "192.168.1.0/24"
- name: WG_MTU
value: "1280"
volumeMounts:
- name: wg-easy
mountPath: /etc/wireguard
volumes:
- name: wg-easy
persistentVolumeClaim:
claimName: wg-easy