diff --git a/stable/openvpn/Chart.yaml b/stable/openvpn/Chart.yaml index 5b5907225c..0961b6b0e9 100755 --- a/stable/openvpn/Chart.yaml +++ b/stable/openvpn/Chart.yaml @@ -3,7 +3,7 @@ description: A Helm chart to install an openvpn server inside a kubernetes clust generation is also part of the deployment, and this chart will generate client keys as needed. name: openvpn -version: 3.8.0 +version: 3.9.0 appVersion: 1.1.0 maintainers: - name: jfelten diff --git a/stable/openvpn/README.md b/stable/openvpn/README.md index 89bcd1886e..ce9a42444d 100644 --- a/stable/openvpn/README.md +++ b/stable/openvpn/README.md @@ -78,6 +78,8 @@ Parameter | Description | Default `openvpn.OVPN_PROTO` | Protocol used by openvpn tcp or udp | `tcp` `openvpn.OVPN_K8S_POD_NETWORK` | Kubernetes pod network (optional) | `10.0.0.0` `openvpn.OVPN_K8S_POD_SUBNET` | Kubernetes pod network subnet (optional) | `255.0.0.0` +`openvpn.OVPN_K8S_SVC_NETWORK` | Kubernetes service network (optional) | `nil` +`openvpn.OVPN_K8S_SVC_SUBNET` | Kubernetes service network subnet (optional) | `nil` `openvpn.dhcpOptionDomain` | Push a `dhcp-option DOMAIN` config | `true` `openvpn.conf` | Arbitrary lines appended to the end of the server configuration file | `nil` `openvpn.redirectGateway` | Redirect all client traffic through VPN | `true` @@ -85,6 +87,8 @@ Parameter | Description | Default This chart has been engineered to use kube-dns and route all network traffic to kubernetes pods and services, to disable this behaviour set `openvpn.OVPN_K8S_POD_NETWORK` and `openvpn.OVPN_K8S_POD_SUBNET` to `null`. +If openvpn.OVPN_K8S_SVC_NETWORK and openvpn.OVPN_K8S_SVC_SUBNET are defined, an extra route for services subnet will be added. + #### Note: As configured the chart will create a route for a large 10.0.0.0/8 network that may cause issues if that is your local network. If so tweak this value to something more restrictive. This route is added, because GKE generates pods with IPs in this range. ### Certificates diff --git a/stable/openvpn/templates/config-openvpn.yaml b/stable/openvpn/templates/config-openvpn.yaml index acc22d7ac7..49994ce8d0 100644 --- a/stable/openvpn/templates/config-openvpn.yaml +++ b/stable/openvpn/templates/config-openvpn.yaml @@ -105,6 +105,9 @@ data: {{ if (.Values.openvpn.OVPN_K8S_POD_NETWORK) (.Values.openvpn.OVPN_K8S_POD_SUBNET) }} push "route {{ .Values.openvpn.OVPN_K8S_POD_NETWORK }} {{ .Values.openvpn.OVPN_K8S_POD_SUBNET }}" {{ end }} +{{ if (.Values.openvpn.OVPN_K8S_SVC_NETWORK) (.Values.openvpn.OVPN_SVC_POD_SUBNET) }} + push "route {{ .Values.openvpn.OVPN_K8S_SVC_NETWORK }} {{ .Values.openvpn.OVPN_K8S_SVC_SUBNET }}" +{{ end }} {{ if .Values.openvpn.dhcpOptionDomain }} OVPN_K8S_SEARCH diff --git a/stable/openvpn/values.yaml b/stable/openvpn/values.yaml index 1b4886141e..854659247d 100644 --- a/stable/openvpn/values.yaml +++ b/stable/openvpn/values.yaml @@ -63,6 +63,11 @@ openvpn: OVPN_K8S_POD_NETWORK: "10.0.0.0" # Kubernetes pod network subnet (optional). OVPN_K8S_POD_SUBNET: "255.0.0.0" + # Kubernetes service network (optional). + # Define openvpn.OVPN_K8S_POD_NETWORK and openvpn.OVPN_K8S_POD_SUBNET if it's needed to create a separate route to Kubernates service subnet + # OVPN_K8S_POD_NETWORK: + # Kubernetes service network subnet (optional). + # OVPN_K8S_POD_SUBNET: # Push a `dhcp-option DOMAIN` config dhcpOptionDomain: true # Redirect all client traffic through VPN