From ef4e666253dc1446e077187586ec26653725afb6 Mon Sep 17 00:00:00 2001 From: Lyle Franklin Date: Wed, 2 Jan 2019 11:53:02 -0800 Subject: [PATCH] Add configurable `podAnnotations` to openvpn chart (#9835) * Add configurable `podAnnotations` to openvpn chart Use case is using `ark` + `restic` to take backups which requires pods with persistent data to be annotated like: ``` kubectl annotate pod openvpn-6cff5449-wl48k backup.ark.heptio.com/backup-volumes=certs ``` Signed-off-by: Lyle Franklin * Use toYaml helper in openvpn Signed-off-by: Lyle Franklin --- stable/openvpn/Chart.yaml | 2 +- stable/openvpn/README.md | 1 + stable/openvpn/templates/openvpn-deployment.yaml | 3 +++ stable/openvpn/values.yaml | 4 ++++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/stable/openvpn/Chart.yaml b/stable/openvpn/Chart.yaml index 1875da7d06..87013c7f4e 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.10.0 +version: 3.11.0 appVersion: 1.1.0 maintainers: - name: jfelten diff --git a/stable/openvpn/README.md b/stable/openvpn/README.md index c21ddd253f..797a0bad1a 100644 --- a/stable/openvpn/README.md +++ b/stable/openvpn/README.md @@ -73,6 +73,7 @@ Parameter | Description | Default `persistence.storageClass` | Storage class of backing PVC | `nil` `persistence.accessMode` | Use volume as ReadOnly or ReadWrite | `ReadWriteOnce` `persistence.size` | Size of data volume | `2M` +`podAnnotations` | Key-value pairs to add as pod annotations | `{}` `openvpn.OVPN_NETWORK` | Network allocated for openvpn clients | `10.240.0.0` `openvpn.OVPN_SUBNET` | Network subnet allocated for openvpn | `255.255.0.0` `openvpn.OVPN_PROTO` | Protocol used by openvpn tcp or udp | `tcp` diff --git a/stable/openvpn/templates/openvpn-deployment.yaml b/stable/openvpn/templates/openvpn-deployment.yaml index 871b8c5133..51b656196c 100644 --- a/stable/openvpn/templates/openvpn-deployment.yaml +++ b/stable/openvpn/templates/openvpn-deployment.yaml @@ -24,6 +24,9 @@ spec: release: {{ .Release.Name }} annotations: checksum/config: {{ include (print .Template.BasePath "/config-openvpn.yaml") . | sha256sum }} + {{- if .Values.podAnnotations }} +{{ toYaml .Values.podAnnotations | indent 8 }} + {{- end }} spec: containers: - name: {{ .Chart.Name }} diff --git a/stable/openvpn/values.yaml b/stable/openvpn/values.yaml index 82a5cb773a..9f58b8bf9d 100644 --- a/stable/openvpn/values.yaml +++ b/stable/openvpn/values.yaml @@ -26,6 +26,10 @@ service: # annotations: # external-dns.alpha.kubernetes.io/hostname: vpn.example.com annotations: {} +## Here annotations can be added to the openvpn pod +# podAnnotations: +# backup.ark.heptio.com/backup-volumes: certs +podAnnotations: {} resources: limits: