Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions deploy/helm/wg-access-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.sysctlInitContainer }}
initContainers:
- command:
- sysctl
- -w
- net.ipv4.ip_forward=1
image: busybox
imagePullPolicy: IfNotPresent
name: init-sysctl
securityContext:
privileged: true
runAsNonRoot: false
runAsUser: 0
{{- end }}
containers:
- name: {{ .Chart.Name }}
Expand Down
9 changes: 9 additions & 0 deletions deploy/helm/wg-access-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,12 @@ nodeSelector: {}
tolerations: []

affinity: {}

# sysctlInitContainer flag adds an initContainer named "init-sysctl" to wg-access-server deployment.
# The goal is to set the sysctl net.ipv4.ip_forward=1 to allow packet routing through node.
# This initContainer needs to run as privileged, but this is only limited to
# the initContainer run time, the main container will remain unprivileged as expected.
# Use case :
# DNS is functionning properly through VPN but does not work for standard traffic.
# NB : If you have no problem with wireguard traffic, you should not enable this initContainer
sysctlInitContainer: false