|
1 | | -wg-easy: |
2 | | - wireguard: |
| 1 | +# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s-labs/helm-charts/app-template-3.7.3/charts/other/app-template/values.schema.json |
| 2 | +controllers: |
| 3 | + main: |
| 4 | + containers: |
| 5 | + 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" "" .Values | quote }}' |
| 11 | + WG_MTU: '{{ dig "wireguard" "mtu" "" .Values | quote }}' |
| 12 | + WG_PERSISTENT_KEEPALIVE: '{{ dig "wireguard" "persistentKeepalive" "" .Values | quote }}' |
| 13 | + WG_DEFAULT_ADDRESS: '{{ dig "wireguard" "defaultAddress" "" .Values | quote }}' |
| 14 | + WG_DEFAULT_DNS: '{{ dig "wireguard" "defaultDns" "" .Values | quote }}' |
| 15 | + WG_ALLOWED_IPS: '{{ dig "wireguard" "allowedIps" "" .Values | quote }}' |
| 16 | + WG_PRE_UP: '{{ dig "wireguard" "preUp" "" .Values | quote }}' |
| 17 | + WG_POST_UP: '{{ dig "wireguard" "postUp" "" .Values | quote }}' |
| 18 | + WG_PRE_DOWN: '{{ dig "wireguard" "preDown" "" .Values | quote }}' |
| 19 | + WG_POST_DOWN: '{{ dig "wireguard" "postDown" "" .Values | quote }}' |
| 20 | + envFrom: |
| 21 | + - secretRef: |
| 22 | + identifier: webpass |
| 23 | + securityContext: |
| 24 | + allowPrivilegeEscalation: false |
| 25 | + sysctls: |
| 26 | + - name: net.ipv4.ip_forward |
| 27 | + value: "1" |
| 28 | + capabilities: |
| 29 | + add: |
| 30 | + - NET_ADMIN |
| 31 | + image: |
| 32 | + repository: ghcr.io/wg-easy/wg-easy |
| 33 | + tag: 9.0 |
| 34 | + pullPolicy: IfNotPresent |
| 35 | + ports: |
| 36 | + - containerPort: 51821 |
| 37 | + protocol: TCP |
| 38 | + - containerPort: 51820 |
| 39 | + protocol: UDP |
| 40 | + resources: |
| 41 | + requests: |
| 42 | + cpu: 50m |
| 43 | + memory: 50Mi |
| 44 | + limits: |
| 45 | + cpu: 100m |
| 46 | + memory: 100Mi |
| 47 | + probes: |
| 48 | + liveness: |
| 49 | + enabled: true |
| 50 | + spec: |
| 51 | + initialDelaySeconds: 0 |
| 52 | + periodSeconds: 10 |
| 53 | + timeoutSeconds: 5 |
| 54 | + failureThreshold: 5 |
| 55 | + readiness: |
| 56 | + enabled: true |
| 57 | + spec: |
| 58 | + initialDelaySeconds: 0 |
| 59 | + periodSeconds: 10 |
| 60 | + timeoutSeconds: 1 |
| 61 | + failureThreshold: 5 |
| 62 | + |
| 63 | + # Liveness: tcp-socket :51821 delay=0s timeout=5s period=10s #success=1 #failure=5 |
| 64 | + # Readiness: tcp-socket :51821 delay=0s timeout=1s period=10s #success=1 #failure=5 |
| 65 | + |
| 66 | +secrets: |
| 67 | + webpass: |
| 68 | + enabled: true |
| 69 | + data: |
| 70 | + PASSWORD: '{{ dig "wireguard" "password" nil .Values | quote }}' |
| 71 | + |
| 72 | +service: |
| 73 | + web: |
| 74 | + controller: main |
| 75 | + enabled: true |
| 76 | + type: ClusterIP |
| 77 | + ipFamilyPolicy: SingleStack |
| 78 | + ipFamilies: |
| 79 | + - IPv4 |
| 80 | + ports: |
| 81 | + http: |
| 82 | + enabled: true |
| 83 | + port: 51821 |
| 84 | + protocol: HTTP |
| 85 | + primary: true |
| 86 | + vpn: |
| 87 | + controller: main |
| 88 | + enabled: true |
| 89 | + type: LoadBalancer |
| 90 | + ipFamilyPolicy: SingleStack |
| 91 | + ipFamilies: |
| 92 | + - IPv4 |
| 93 | + ports: |
| 94 | + udp: |
| 95 | + enabled: true |
| 96 | + port: 51820 |
| 97 | + protocol: UDP |
| 98 | + |
| 99 | +persistence: |
| 100 | + config: |
| 101 | + enabled: true |
| 102 | + type: persistentVolumeClaim |
| 103 | + storageClass: '' |
| 104 | + accessMode: ReadWriteOnce |
| 105 | + size: 1Gi |
| 106 | + retain: false |
| 107 | + globalMounts: |
| 108 | + - path: /etc/wireguard |
| 109 | + |
| 110 | +# Wireguard configuration |
| 111 | +wireguard: |
| 112 | + # If password is defined will set a password on the web interface |
3 | 113 | password: "testpass" |
| 114 | + # See https://github.com/WeeJeWel/wg-easy for configuration options |
4 | 115 | host: "example.com" |
5 | 116 | port: 51820 # This is used in the postUp |
6 | 117 | defaultAddress: "10.10.10.x" |
7 | 118 | defaultDns: "1.1.1.1" |
8 | 119 | 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" |
9 | 120 | 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 | 121 |
|
| 122 | +# Troubleshoot |
| 123 | +troubleshoot: |
| 124 | + support-bundles: |
| 125 | + replicated: |
| 126 | + enabled: true |
| 127 | + # wg-easy: # arbitrary name for your custom spec |
| 128 | + # enabled: true |
| 129 | + # collectors: |
| 130 | + # - logs: |
| 131 | + # name: wg-easy |
| 132 | + # collectorName: wg-easy |
| 133 | + # selector: |
| 134 | + # - app=wg-easy |
| 135 | + # # namespace: {{ .Release.Namespace }} |
| 136 | + # containerNames: |
| 137 | + # - wg-easy |
| 138 | + # securityContext: |
| 139 | + # allowPrivilegeEscalation: false |
| 140 | + # sysctls: |
| 141 | + # - name: net.ipv4.ip_forward |
| 142 | + # value: "1" |
| 143 | + # capabilities: |
| 144 | + # add: |
| 145 | + # - NET_ADMIN |
| 146 | + # image: |
| 147 | + # repository: ghcr.io/wg-easy/wg-easy |
| 148 | + # tag: 9.0 |
| 149 | + # pullPolicy: IfNotPresent |
| 150 | + # ports: |
| 151 | + # - containerPort: 51821 |
| 152 | + # protocol: TCP |
| 153 | + # - containerPort: 51820 |
| 154 | + # protocol: UDP |
| 155 | + # resources: |
| 156 | + # requests: |
| 157 | + # cpu: 50m |
| 158 | + # memory: 50Mi |
| 159 | + # limits: |
| 160 | + # cpu: 100m |
| 161 | + # memory: 100Mi |
| 162 | + |
| 163 | + |
| 164 | +wg-easy: |
| 165 | + |
| 166 | + |
11 | 167 | templates: |
12 | 168 | traefikRoutes: |
13 | 169 | web-tls: |
|
0 commit comments