Skip to content

Commit 60ceb2d

Browse files
Added interfaceOpts Adapted to usage in amnezia-wg (#56)
I adapted this charr for usage in amnezia-wg (https://github.com/amnezia-vpn/amneziawg-tools) but we should to add extra obfuscation opts in interface part of config.
1 parent 8ec1c2e commit 60ceb2d

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

helm/wireguard/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: wireguard
33
description: A Helm chart for managing a wireguard vpn in kubernetes
44
type: application
5-
version: 0.25.0
5+
version: 0.26.0
66
appVersion: "0.0.0"
77
maintainers:
88
- name: bryopsida

helm/wireguard/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# wireguard
22

3-
![Version: 0.25.0](https://img.shields.io/badge/Version-0.25.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.0](https://img.shields.io/badge/AppVersion-0.0.0-informational?style=flat-square)
3+
![Version: 0.26.0](https://img.shields.io/badge/Version-0.26.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.0](https://img.shields.io/badge/AppVersion-0.0.0-informational?style=flat-square)
44

55
A Helm chart for managing a wireguard vpn in kubernetes
66

@@ -129,6 +129,7 @@ A Helm chart for managing a wireguard vpn in kubernetes
129129
| volumeMounts | object | `{}` | Passthrough pod volume mounts |
130130
| volumes | object | `{}` | Passthrough pod volumes |
131131
| wireguard.clients | list | `[]` | A collection of clients that will be added to wg0.conf, accepts objects with keys PublicKey and AllowedIPs (mandatory) and optional FriendlyName or FriendlyJson (https://github.com/MindFlavor/prometheus_wireguard_exporter#friendly-tags) and PersistentKeepalive (https://www.wireguard.com/quickstart/#nat-and-firewall-traversal-persistence), stored in secret |
132+
| wireguard.interfaceOpts | object | `{}` | A collection of extraopts for wireguard interface |
132133
| wireguard.natAddSourceNet | bool | `true` | Add the serverCidr to the nat source net option |
133134
| wireguard.serverAddress | string | `"10.34.0.1/24"` | Address of the VPN server |
134135
| wireguard.serverCidr | string | `"10.34.0.0/24"` | Subnet for your VPN, take care not to clash with cluster POD cidr |

helm/wireguard/templates/config.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ Address = {{ .Values.wireguard.serverAddress }}
55
ListenPort = 51820
66
PostUp = wg set wg0 private-key /etc/wireguard/privatekey && iptables -t nat -A POSTROUTING {{ $natSourceNetOption }} -o eth0 -j MASQUERADE
77
PostDown = iptables -t nat -D POSTROUTING -s {{ $natSourceNetOption }} -o eth0 -j MASQUERADE
8-
8+
{{- range $key, $value := .Values.wireguard.interfaceOpts }}
9+
{{ $key }} = {{ $value }}
10+
{{- end }}
911
# Clients
1012
{{- range .Values.wireguard.clients }}
1113
[Peer]
@@ -34,4 +36,4 @@ metadata:
3436
name: "{{ .Release.Name }}-wg-config"
3537
data:
3638
wg0.conf: {{ include "wg-config-template" . | b64enc }}
37-
{{- end }}
39+
{{- end }}

helm/wireguard/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ wireguard:
5252
serverCidr: 10.34.0.0/24
5353
# -- Add the serverCidr to the nat source net option
5454
natAddSourceNet: true
55+
# -- A collection of extraopts for wireguard interface
56+
interfaceOpts: {}
5557
# -- A collection of clients that will be added to wg0.conf, accepts objects with keys PublicKey and AllowedIPs (mandatory) and optional FriendlyName or FriendlyJson (https://github.com/MindFlavor/prometheus_wireguard_exporter#friendly-tags) and PersistentKeepalive (https://www.wireguard.com/quickstart/#nat-and-firewall-traversal-persistence), stored in secret
5658
clients: []
5759
# - FriendlyName: username1

0 commit comments

Comments
 (0)