fix(pihole): fix pihole (#9229)

**Description**
<!--
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.
-->
⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [x] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [x] ⚖️ My code follows the style guidelines of this project
- [x] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [x] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [x] ⬆️ I increased versions for any altered app according to semantic
versioning

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🪞 I have opened a PR on
[truecharts/containers](https://github.com/truecharts/containers) adding
the container to TrueCharts mirror repo.
- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
This commit is contained in:
Stavros Kois
2023-05-28 23:16:45 +03:00
committed by GitHub
parent 4a2311e4d5
commit c3d3fef8b3
4 changed files with 34 additions and 30 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ sources:
- https://github.com/pi-hole
- https://github.com/pi-hole/docker-pi-hole
type: application
version: 10.0.0
version: 10.0.1
annotations:
truecharts.org/catagories: |
- networking
+12 -12
View File
@@ -27,25 +27,25 @@ questions:
additional_attrs: true
type: dict
attrs:
- variable: WEBPASSWORD
label: "WEBPASSWORD"
- variable: webPassword
label: "Web Password"
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)"
- variable: dnsServers
label: "DNS Servers"
description: "Set DNS servers. Max 2. Use #port suffix for ports"
schema:
type: list
default: ["9.9.9.9", "149.112.112.112"]
items:
- variable: dnsEntry
label: "DNS Server Entry"
schema:
type: string
default: "9.9.9.9"
- variable: DNS2
label: "DNS2"
description: "Sets the second DNS server (use #port suffix for ports), only if DNS1 is entered"
schema:
type: string
default: "149.112.112.112"
default: ""
# Include{podOptions}
# Include{serviceRoot}
- variable: main
@@ -1,9 +1,14 @@
{{/* Define the configmap */}}
{{- define "pihole.configmap" -}}
configmap:
pihole-env:
enabled: true
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 }}
WEBPASSWORD: {{ .Values.pihole.webPassword | squote }}
{{- with .Values.pihole.dnsServers }}
{{- if gt (len .) 2 -}}
{{- fail (printf "Pihole - Expected max 2 DNS Servers. But got [%v]" (len .)) -}}
{{- end }}
PIHOLE_DNS_: {{ join ";" . | quote }}
{{- end }}
{{- end -}}
+9 -10
View File
@@ -3,11 +3,16 @@ image:
pullPolicy: IfNotPresent
tag: 2023.03.1@sha256:e48aa04bcdef84fb42f35fa2aaf54dd3ee868e2b80ab535a0ca59a8c6901453b
pihole:
webPassword: "somepassword"
dnsServers:
- "9.9.9.9"
- "149.112.112.112"
securityContext:
container:
readOnlyRootFilesystem: false
runAsNonRoot: false
allowPrivilegeEscalation: true
runAsUser: 0
runAsGroup: 0
capabilities:
@@ -22,6 +27,9 @@ workload:
podSpec:
containers:
main:
envFrom:
- configMapRef:
name: pihole-env
probes:
liveness:
type: http
@@ -33,10 +41,6 @@ workload:
type: http
path: /admin/index.php
envFrom:
- configMapRef:
name: pihole-env
service:
main:
ports:
@@ -59,11 +63,6 @@ service:
port: 53
targetPort: 53
pihole:
WEBPASSWORD: "somepassword"
DNS1: "9.9.9.9"
DNS2: "149.112.112.112"
persistence:
config:
enabled: true