Skip to content

Commit e7ec485

Browse files
committed
set up wg-easy env vars
1 parent e3c022a commit e7ec485

File tree

2 files changed

+60
-23
lines changed

2 files changed

+60
-23
lines changed

applications/wg-easy/charts/wg-easy/charts/wg-easy/values.yaml

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@ controllers:
33
main:
44
containers:
55
main:
6+
env:
7+
# Host is required, no default makes sense
8+
WG_HOST: '{{ required "external host name is required. Set wireguard.host" .Values.wireguard.host }}'
9+
# Use dig with sensible defaults for all other parameters
10+
WG_PORT: '{{ dig "wireguard" "port" "51820" .Values | quote }}'
11+
WG_MTU: '{{ dig "wireguard" "mtu" "1420" .Values | quote }}'
12+
WG_PERSISTENT_KEEPALIVE: '{{ dig "wireguard" "persistentKeepalive" "25" .Values | quote }}'
13+
WG_DEFAULT_ADDRESS: '{{ dig "wireguard" "defaultAddress" "10.10.10.x" .Values | quote }}'
14+
WG_DEFAULT_DNS: '{{ dig "wireguard" "defaultDns" "1.1.1.1" .Values | quote }}'
15+
WG_ALLOWED_IPS: '{{ dig "wireguard" "allowedIps" "0.0.0.0/0, ::/0" .Values | quote }}'
16+
# Optional parameters that default to empty if not provided
17+
WG_PRE_UP: '{{ dig "wireguard" "preUp" "" .Values | quote }}'
18+
WG_POST_UP: '{{ dig "wireguard" "postUp" "" .Values | quote }}'
19+
WG_PRE_DOWN: '{{ dig "wireguard" "preDown" "" .Values | quote }}'
20+
WG_POST_DOWN: '{{ dig "wireguard" "postDown" "" .Values | quote }}'
21+
envFrom:
22+
- secretRef:
23+
identifier: webpass
624
securityContext:
725
allowPrivilegeEscalation: false
826
sysctls:
@@ -28,6 +46,12 @@ controllers:
2846
cpu: 100m
2947
memory: 100Mi
3048

49+
secrets:
50+
webpass:
51+
enabled: true
52+
data:
53+
PASSWORD: '{{ dig "wireguard" "password" nil .Values | quote }}'
54+
3155
service:
3256
web:
3357
controller: main
@@ -85,7 +109,40 @@ wireguard:
85109
# Troubleshoot
86110
troubleshoot:
87111
support-bundles:
88-
# Replicated supplied default support bundle spec
89112
replicated:
90-
# -- Enables or disables the Replicated default support bundle
91113
enabled: true
114+
# wg-easy: # arbitrary name for your custom spec
115+
# enabled: true
116+
# collectors:
117+
# - logs:
118+
# name: wg-easy
119+
# collectorName: wg-easy
120+
# selector:
121+
# - app=wg-easy
122+
# # namespace: {{ .Release.Namespace }}
123+
# containerNames:
124+
# - wg-easy
125+
# securityContext:
126+
# allowPrivilegeEscalation: false
127+
# sysctls:
128+
# - name: net.ipv4.ip_forward
129+
# value: "1"
130+
# capabilities:
131+
# add:
132+
# - NET_ADMIN
133+
# image:
134+
# repository: ghcr.io/wg-easy/wg-easy
135+
# tag: 9.0
136+
# pullPolicy: IfNotPresent
137+
# ports:
138+
# - containerPort: 51821
139+
# protocol: TCP
140+
# - containerPort: 51820
141+
# protocol: UDP
142+
# resources:
143+
# requests:
144+
# cpu: 50m
145+
# memory: 50Mi
146+
# limits:
147+
# cpu: 100m
148+
# memory: 100Mi

applications/wg-easy/charts/wg-easy/values.yaml

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,4 @@
11
wg-easy:
2-
# global:
3-
# fullNameOverride: public
4-
# apps:
5-
# wg-easy:
6-
# fullNameOverride: public
7-
# containers:
8-
# wg-container:
9-
# resources:
10-
# requests:
11-
# cpu: 5m
12-
# memory: 35Mi
13-
# persistence:
14-
# config:
15-
# persistentVolumeClaim:
16-
# spec:
17-
# resources:
18-
# requests:
19-
# storage: 1Gi
20-
# services:
21-
# vpn:
22-
# type: NodePort
232
wireguard:
243
password: "testpass"
254
host: "example.com"
@@ -28,6 +7,7 @@ wg-easy:
287
defaultDns: "1.1.1.1"
298
allowedIps: "0.0.0.0/5, 8.0.0.0/7, 11.0.0.0/8, 12.0.0.0/6, 16.0.0.0/4, 32.0.0.0/3, 64.0.0.0/2, 128.0.0.0/3, 160.0.0.0/5, 168.0.0.0/6, 172.0.0.0/12, 172.32.0.0/11, 172.64.0.0/10, 172.128.0.0/9, 173.0.0.0/8, 174.0.0.0/7, 176.0.0.0/4, 192.0.0.0/9, 192.128.0.0/11, 192.160.0.0/13, 192.169.0.0/16, 192.170.0.0/15, 192.172.0.0/14, 192.176.0.0/12, 192.192.0.0/10, 193.0.0.0/8, 194.0.0.0/7, 196.0.0.0/6, 200.0.0.0/5, 208.0.0.0/4, 224.0.0.0/3"
309
postUp: "iptables -A FORWARD -i wg0 -o eth0 -d 192.168.0.0/16,172.16.0.0/12,10.0.0.0/8 -j DROP; iptables -t nat -A POSTROUTING -s 10.10.10.0/24 -o eth0 -j MASQUERADE; iptables -A INPUT -p udp -m udp --dport 51820 -j ACCEPT; iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT"
10+
3111
templates:
3212
traefikRoutes:
3313
web-tls:

0 commit comments

Comments
 (0)