openvpn-as

by Stenic

Helm chartv0.1.9App version-2.8.6-916f8e7d-ubuntu18Verified publisher

A Helm chart for Kubernetes

About this chart

openvpn-as

TL;DR;

helm repo add stenic https://stenic.github.io/helm-charts
helm install my-release --set "service.type=LoadBalancer" stenic/openvpn-as

Introduction

This chart installs openvpn-as on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • Kubernetes 1.12+
  • Helm 3.0+
  • LoadBalancer to expose the vpn service
  • PV provisioner support in the underlying infrastructure

Installing the Chart

To install the chart with the release name my-release:

helm repo add stenic https://stenic.github.io/helm-charts
helm install my-release --set "service.type=LoadBalancer" stenic/openvpn-as

These commands deploy openvpn-as on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release deployment:

helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following tables list the configurable parameters of the openvpn-as chart and their default values.

KeyTypeDefaultDescription
affinityobject{}Affinity labels for pod assignment
fullnameOverridestring""
image.pullPolicystring"IfNotPresent"Image pull policy
image.repositorystring"ghcr.io/linuxserver/openvpn-as"Image repository
image.tagstring""Image tag
imagePullSecretslist[]Registry secret names as an array
ingress.admin.annotationsobject{}Ingress annotations
ingress.admin.enabledboolfalseEnable ingress resource for Admin GUI
ingress.admin.hostNamestring"admin.openvpn.local"
ingress.admin.tls.enabledbooltrueEnable TLS configuration for the hostname defined at ingress.admin.hostname parameter
ingress.admin.tls.secretNamestring"admin.openvpn-tls"
ingress.gui.annotationsobject{}Ingress annotations
ingress.gui.enabledboolfalseEnable ingress resource for Client GUI
ingress.gui.hostNamestring"client.openvpn.local"
ingress.gui.tls.enabledbooltrueEnable TLS configuration for the hostname defined at ingress.gui.hostname parameter
ingress.gui.tls.secretNamestring"client.openvpn-tls"
nameOverridestring""
nodeSelectorobject{}Node labels for pod assignment
openvpn.admin.passwordstring"passw0rd"Password for the initial super_user
openvpn.admin.userstring"altmin"Username for the initial super_user. cannot be admin
openvpn.configobject{"vpn.client.routing.reroute_dns":"false","vpn.client.routing.reroute_gw":"false"}Config settings to apply to the openvpn-as server
openvpn.ports.adminint943Admin GUI port
openvpn.ports.guiint944Client GUI port
openvpn.ports.tcpint9443VPN TCP port
openvpn.ports.udpint1194VPN UDP port
openvpn.userslistnilAdditional users to create when non-existent [{"user":"someuser","password":"somepassword"}]
openvpn.timezonestring"Europe/London"Server timezone
persistence.accessModestring"ReadWriteOnce"PVC Access Mode for volume
persistence.annotationsobject{}Annotations for the PVC
persistence.enabledbooltrueEnable persistence using PVC
persistence.sizestring"8Gi"PVC Storage Request for volume
persistence.storageClassstringnilPVC Storage Class for volume
persistence.existingClaimNamestringnilTo use an existing PVC Storage by its name instead of creating one
persistence.backupSubpathstring"backup"To customize subpath for backups on PVC Storage
persistence.licensesSubpathstring"licenses"To customize subpath for licenses on PVC Storage
podAnnotationsobject{}Map of annotations to add to the pods
podSecurityContext.fsGroupint1000Group ID for the pod
replicaCountint1
resourcesobject{}CPU/Memory resource requests/limits
securityContextobject{"capabilities":{"add":["NET_ADMIN"]}}Security Context
service.admin.typestring"ClusterIP"Kubernetes Service type for Admin GUI
service.gui.typestring"ClusterIP"Kubernetes Service type for Client GUI
service.typestring"ClusterIP"Kubernetes Service type for VPN, generally this is "LoadBalancer"
service.udp.enabledbooltrueCreate Service for UDP Traffic VPN
service.tcp.enabledbooltrueCreate Service for TCP Traffic VPN
serviceAccount.annotationsobject{}
serviceAccount.createbooltrueCreate ServiceAccount
serviceAccount.namestring""
tolerationslist[]Toleration labels for pod assignment

Specify each parameter using the --set key=value[,key=value] argument to helm install.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

helm install my-release -f values.yaml stenic/openvpn-as

Deploy openvpn-as with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has openvpn-as on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartopenvpn-as is pinned at v0.1.9 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply