fix: completely remove unused volumes and correctly enable used volumes for VPN

This commit is contained in:
kjeld Schouten-Lebbing
2021-09-12 22:30:05 +02:00
parent 9001e1f935
commit e15b80e105
4 changed files with 8 additions and 37 deletions
@@ -1413,6 +1413,12 @@ questions:
type: dict type: dict
show_if: [["type", "!=", "disabled"]] show_if: [["type", "!=", "disabled"]]
attrs: attrs:
- variable: enabled
label: "enabled"
schema:
type: boolean
default: true
hidden: true
- variable: type - variable: type
label: "type" label: "type"
schema: schema:
+1 -1
View File
@@ -18,4 +18,4 @@ maintainers:
name: common name: common
sources: null sources: null
type: library type: library
version: 7.0.9 version: 7.0.10
@@ -1,23 +0,0 @@
{{/*
The VPN config and scripts to be included.
*/}}
{{- define "common.addon.vpn.configmap" -}}
{{- if or .Values.addons.vpn.scripts.up .Values.addons.vpn.scripts.down }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.names.fullname" . }}-vpn
labels:
{{- include "common.labels" . | nindent 4 }}
data:
{{- with .Values.addons.vpn.scripts.up }}
up.sh: |-
{{- . | nindent 4}}
{{- end }}
{{- with .Values.addons.vpn.scripts.down }}
down.sh: |-
{{- . | nindent 4}}
{{- end }}
{{- end -}}
{{- end -}}
+1 -13
View File
@@ -681,12 +681,10 @@ resources:
# -- The common chart supports several add-ons. These can be configured under this key. # -- The common chart supports several add-ons. These can be configured under this key.
# @default -- See below # @default -- See below
addons: addons:
# -- The common chart supports adding a VPN add-on. It can be configured under this key. # -- The common chart supports adding a VPN add-on. It can be configured under this key.
# For more info, check out [our docs](http://docs.k8s-at-home.com/our-helm-charts/common-library-add-ons/#wireguard-vpn) # For more info, check out [our docs](http://docs.k8s-at-home.com/our-helm-charts/common-library-add-ons/#wireguard-vpn)
# @default -- See values.yaml # @default -- See values.yaml
vpn: vpn:
# -- Specify the VPN type. Valid options are disabled, openvpn or wireguard # -- Specify the VPN type. Valid options are disabled, openvpn or wireguard
type: disabled type: disabled
@@ -700,7 +698,7 @@ addons:
authSecret: # my-vpn-secret authSecret: # my-vpn-secret
wireguard: wireguard:
KILLSWITCH: true KILLSWITCH: false
KILLSWITCH_EXCLUDEDNETWORKS_IPV4: KILLSWITCH_EXCLUDEDNETWORKS_IPV4:
- 192.168.0.0.1 - 192.168.0.0.1
# -- Set the VPN container specific securityContext # -- Set the VPN container specific securityContext
@@ -730,16 +728,6 @@ addons:
# See Kubernetes documentation for options. # See Kubernetes documentation for options.
hostPathType: "File" hostPathType: "File"
# -- Provide custom up/down scripts that can be used by the vpn configuration.
# @default -- See values.yaml
scripts:
up: |-
#!/bin/bash
echo "connected" > /shared/vpnstatus
down: |-
#!/bin/bash
echo "disconnected" > /shared/vpnstatus
# -- The common library supports adding a code-server add-on to access files. It can be configured under this key. # -- The common library supports adding a code-server add-on to access files. It can be configured under this key.
# For more info, check out [our docs](http://docs.k8s-at-home.com/our-helm-charts/common-library-add-ons/#code-server) # For more info, check out [our docs](http://docs.k8s-at-home.com/our-helm-charts/common-library-add-ons/#code-server)