mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 17:07:04 +02:00
# Removed - Promtail add-on has been removed # Fixed - Fixed httpGet probe whitespace rendering (#76) - Fixed Secret management for ServiceAccounts (fixes #78) - Fixed code-server add-on Service rendering # Added - Added support for Gateway API Routes (#59) # Changed - Services and their ports are now assumed enabled by default - Updated `code-server` image to v4.8.3 - Updated `netshoot` image to v0.8 Signed-off-by: András Maróy <andras@maroy.hu> Signed-off-by: András Maróy <andras@maroy.hu> Co-authored-by: András Maróy <andras@maroy.hu> Co-authored-by: pando85 <pando855@gmail.com>
45 lines
1.9 KiB
Smarty
45 lines
1.9 KiB
Smarty
{{/*
|
|
Template to render VPN addon
|
|
It will include / inject the required templates based on the given values.
|
|
*/}}
|
|
{{- define "bjw-s.common.addon.vpn" -}}
|
|
{{- if .Values.addons.vpn.enabled -}}
|
|
{{- if eq "gluetun" .Values.addons.vpn.type -}}
|
|
{{- include "bjw-s.common.addon.gluetun" . }}
|
|
{{- end -}}
|
|
|
|
{{/* Include the configmap if not empty */}}
|
|
{{- if or .Values.addons.vpn.scripts.up .Values.addons.vpn.scripts.down }}
|
|
{{- $configmap := include "bjw-s.common.addon.vpn.configmap" . -}}
|
|
{{- if $configmap -}}
|
|
{{- $_ := set .Values.configMaps "addon-vpn" (dict "enabled" true "data" ($configmap | fromYaml)) -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/* Include the secret if not empty */}}
|
|
{{- if and .Values.addons.vpn.configFile (not .Values.addons.vpn.configFileSecret) }}
|
|
{{- $secret := include "bjw-s.common.addon.vpn.secret" . -}}
|
|
{{- if $secret -}}
|
|
{{- $_ := set .Values.secrets "addon-vpn-config" (dict "enabled" true "stringData" ($secret | fromYaml)) -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/* Append the vpn scripts volume to the volumes */}}
|
|
{{- $scriptVolume := include "bjw-s.common.addon.vpn.scriptsVolumeSpec" . | fromYaml -}}
|
|
{{- if $scriptVolume -}}
|
|
{{- $_ := set .Values.persistence "vpnscript" (dict "enabled" true "mountPath" "-" "type" "custom" "volumeSpec" $scriptVolume) -}}
|
|
{{- end -}}
|
|
|
|
{{/* Append the vpn config volume to the volumes */}}
|
|
{{- $configVolume := include "bjw-s.common.addon.vpn.configVolumeSpec" . | fromYaml }}
|
|
{{ if $configVolume -}}
|
|
{{- $_ := set .Values.persistence "vpnconfig" (dict "enabled" true "mountPath" "-" "type" "custom" "volumeSpec" $configVolume) -}}
|
|
{{- end -}}
|
|
|
|
{{/* Include the networkpolicy if not empty */}}
|
|
{{- $networkpolicy := include "bjw-s.common.addon.vpn.networkpolicy" . -}}
|
|
{{- if $networkpolicy -}}
|
|
{{- $networkpolicy | nindent 0 -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|