update pihole DNS env
This commit is contained in:
@@ -21,4 +21,4 @@ sources:
|
||||
- https://github.com/pi-hole
|
||||
- https://github.com/pi-hole/docker-pi-hole
|
||||
type: application
|
||||
version: 0.0.1
|
||||
version: 0.0.2
|
||||
|
||||
@@ -9,6 +9,10 @@ image:
|
||||
pullPolicy: IfNotPresent
|
||||
tag: v5.8.1
|
||||
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: pihole-env
|
||||
|
||||
##
|
||||
# Most other defaults are set in questions.yaml
|
||||
# For other options please refer to the wiki, default_values.yaml or the common library chart
|
||||
|
||||
@@ -197,25 +197,7 @@ questions:
|
||||
schema:
|
||||
type: string
|
||||
default: "002"
|
||||
- variable: WEBPASSWORD
|
||||
label: "WEBPASSWORD"
|
||||
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
||||
schema:
|
||||
type: string
|
||||
default: ""
|
||||
required: true
|
||||
- variable: DNS1
|
||||
label: "DNS1"
|
||||
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
||||
schema:
|
||||
type: string
|
||||
default: "1.1.1.1"
|
||||
- variable: DNS2
|
||||
label: "DNS2"
|
||||
description: "Sets the UMASK env var for LinuxServer.io (compatible) containers"
|
||||
schema:
|
||||
type: string
|
||||
default: "1.0.0.1"
|
||||
|
||||
# Configure Enviroment Variables
|
||||
- variable: envList
|
||||
label: "Image environment"
|
||||
@@ -238,6 +220,33 @@ questions:
|
||||
schema:
|
||||
type: string
|
||||
|
||||
- variable: pihole
|
||||
group: "App Configuration"
|
||||
label: "Pi-Hole Configuration"
|
||||
schema:
|
||||
type: dict
|
||||
attrs:
|
||||
- variable: WEBPASSWORD
|
||||
label: "WEBPASSWORD"
|
||||
description: "Sets admin password for the GUI"
|
||||
schema:
|
||||
type: string
|
||||
default: ""
|
||||
required: true
|
||||
- variable: DNS1
|
||||
label: "DNS1"
|
||||
description: "Sets the first DNS server (use #port suffix for ports)"
|
||||
schema:
|
||||
type: string
|
||||
default: "1.1.1.1"
|
||||
- variable: DNS2
|
||||
label: "DNS2"
|
||||
description: "Sets the second DNS server (use #port suffix for ports), only if DNS1 is entered"
|
||||
schema:
|
||||
type: string
|
||||
default: "1.0.0.1"
|
||||
|
||||
|
||||
- variable: hostNetwork
|
||||
group: "Networking and Services"
|
||||
label: "Enable Host Networking"
|
||||
|
||||
13
charts/incubator/pihole/templates/_configmap.tpl
Normal file
13
charts/incubator/pihole/templates/_configmap.tpl
Normal file
@@ -0,0 +1,13 @@
|
||||
{{/* Define the configmap */}}
|
||||
{{- define "pihole.configmap" -}}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: pihole-env
|
||||
data:
|
||||
WEBPASSWORD: {{ .Values.pihole.WEBPASSWORD | squote }}
|
||||
{{- if .Values.pihole.DNS1 }}
|
||||
"PIHOLE_DNS_": {{ if .Values.pihole.DNS2 }}{{ ( printf "%v;%v" .Values.pihole.DNS1 .Values.pihole.DNS2 ) | squote }}{{ else }}{{ .Values.pihole.DNS1 | squote }}{{ end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -1 +1,8 @@
|
||||
{{/* Make sure all variables are set properly */}}
|
||||
{{- include "common.values.setup" . }}
|
||||
|
||||
{{/* Render configmap for pihole */}}
|
||||
{{- include "pihole.configmap" . }}
|
||||
|
||||
{{/* Render the templates */}}
|
||||
{{ include "common.all" . }}
|
||||
|
||||
@@ -5,6 +5,9 @@ image:
|
||||
pullPolicy: IfNotPresent
|
||||
tag: v5.8.1
|
||||
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: pihole-env
|
||||
|
||||
service:
|
||||
main:
|
||||
@@ -25,8 +28,8 @@ service:
|
||||
enabled: true
|
||||
port: 53
|
||||
|
||||
env:
|
||||
WEBPASSWORD: "somepassword"
|
||||
pihole:
|
||||
WEBPASSWORD: "somepassword"
|
||||
DNS1: "1.1.1.1"
|
||||
DNS2: "1.0.0.1"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user