diff --git a/stable/openvpn/Chart.yaml b/stable/openvpn/Chart.yaml index b46d6ffb72..62f365d9d9 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: 2.0.0 +version: 2.0.1 maintainers: - name: John Felten email: john.felten@gmail.com diff --git a/stable/openvpn/templates/certs-pvc.yaml b/stable/openvpn/templates/certs-pvc.yaml index 42aa04256c..49e98f4be4 100644 --- a/stable/openvpn/templates/certs-pvc.yaml +++ b/stable/openvpn/templates/certs-pvc.yaml @@ -1,5 +1,4 @@ -{{- if .Values.persistence.enabled }} - +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} kind: PersistentVolumeClaim apiVersion: v1 metadata: diff --git a/stable/openvpn/templates/openvpn-deployment.yaml b/stable/openvpn/templates/openvpn-deployment.yaml index 2914eefea3..c56bbee702 100644 --- a/stable/openvpn/templates/openvpn-deployment.yaml +++ b/stable/openvpn/templates/openvpn-deployment.yaml @@ -53,7 +53,7 @@ spec: - name: certs {{- if .Values.persistence.enabled }} persistentVolumeClaim: - claimName: {{ template "openvpn.fullname" . }} + claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "openvpn.fullname" . }}{{- end }} {{- else }} emptyDir: {} {{- end -}} diff --git a/stable/openvpn/values.yaml b/stable/openvpn/values.yaml index 414f908d9f..3811bcf4be 100644 --- a/stable/openvpn/values.yaml +++ b/stable/openvpn/values.yaml @@ -20,6 +20,11 @@ resources: memory: 128Mi persistence: enabled: true + ## A manually managed Persistent Volume and Claim + ## Requires persistence.enabled: true + ## If defined, PVC must be created manually before volume will be bound + # existingClaim: + ## openvpn data Persistent Volume Storage Class ## If defined, storageClassName: ## If set to "-", storageClassName: "", which disables dynamic provisioning @@ -31,18 +36,17 @@ persistence: accessMode: ReadWriteOnce size: 2M openvpn: - # Network allocated for openvpn clients (default: 10.240.0.0). - OVPN_NETWORK: 10.240.0.0 - # Network subnet allocated for openvpn client (default: 255.255.0.0). - OVPN_SUBNET: 255.255.0.0 - # Protocol used by openvpn tcp or udp (default: udp). - OVPN_PROTO: tcp - # Kubernetes pod network (optional). - OVPN_K8S_POD_NETWORK: "10.0.0.0" - # Kubernetes pod network subnet (optional). - OVPN_K8S_POD_SUBNET: "255.0.0.0" - # Arbitrary lines appended to the end of the server configuration file - #conf: | - # max-clients 100 - # client-to-client - + # Network allocated for openvpn clients (default: 10.240.0.0). + OVPN_NETWORK: 10.240.0.0 + # Network subnet allocated for openvpn client (default: 255.255.0.0). + OVPN_SUBNET: 255.255.0.0 + # Protocol used by openvpn tcp or udp (default: udp). + OVPN_PROTO: tcp + # Kubernetes pod network (optional). + OVPN_K8S_POD_NETWORK: "10.0.0.0" + # Kubernetes pod network subnet (optional). + OVPN_K8S_POD_SUBNET: "255.0.0.0" + # Arbitrary lines appended to the end of the server configuration file + # conf: | + # max-clients 100 + # client-to-client