Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
a96286c
feat: replace cloudflared with dnscrypt-proxy for encrypted DNS
madic-creates Dec 23, 2025
f54c10c
fix(doh): correct dnsprobe command and add readOnly mount for config
madic-creates Dec 23, 2025
e71f827
Merge branch 'main' of github.com:madic-creates/pihole-kubernetes
madic-creates Dec 23, 2025
d701876
feat: upgrade Helm chart to apiVersion v2
madic-creates Dec 23, 2025
ce0d68b
feat!: implement standardized Kubernetes labels following Helm best p…
madic-creates Dec 23, 2025
e3aa452
feat: add ServiceAccount support with configurable token mounting
madic-creates Dec 23, 2025
0b26503
docs: add loadBalancerIP deprecation notice for Kubernetes 1.24+
madic-creates Dec 23, 2025
e1da25d
feat: make NOTES.txt dynamic based on actual service configuration
madic-creates Dec 23, 2025
a3e0305
feat: add startup probes for pihole and DoH containers
madic-creates Dec 23, 2025
c9f7cfa
test: extend helm tests with DNS resolution verification
madic-creates Dec 23, 2025
03e2571
build: optimize .helmignore to reduce packaged chart size
madic-creates Dec 23, 2025
a12092c
feat: add podSecurityContext and containerSecurityContext support
madic-creates Dec 23, 2025
09ae77e
feat: add NetworkPolicy support for network traffic control
madic-creates Dec 23, 2025
672cd3a
feat!: move adminPassword to admin.password section
madic-creates Dec 24, 2025
170cfbf
docs: add DHCP helper deployment example and troubleshooting guide
madic-creates Dec 24, 2025
ff71b72
refactor!: replace blacklist/whitelist terminology with denied/allowed
madic-creates Dec 24, 2025
71e1c70
docs: regenerate README with helm-docs
madic-creates Dec 24, 2025
62fd5e9
docs(examples): simplify dhcphelper example by removing DHCP settings
madic-creates Dec 24, 2025
df9efe8
feat: add commonLabels option to apply labels to all deployed objects
madic-creates Dec 24, 2025
669e20f
docs: add v3 release notes and repository warning
madic-creates Dec 24, 2025
f42f7e1
feat: add periodSeconds and successThreshold to probe configuration
madic-creates Dec 24, 2025
6788e3c
fix: conditionally render hostname, hostNetwork, and admin password
madic-creates Dec 24, 2025
4806e42
fix(tests): use busybox for DNS test to resolve permission error
madic-creates Dec 24, 2025
33d75be
docs: add CHANGELOG reference to v3 warning notice
madic-creates Dec 24, 2025
6c6b89f
docs: document whitelist/blacklist rename as breaking change with mig…
madic-creates Dec 25, 2025
51d9461
fix(examples): update adminPassword to admin.password structure
madic-creates Dec 25, 2025
98ece13
fix(deployment): set empty password explicitly when admin.enabled is …
madic-creates Dec 25, 2025
8621171
Merge branch 'MoJo2600:main' into main
madic-creates Jan 5, 2026
f1d5315
feat: make DNS and DHCP container ports configurable
madic-creates Jan 12, 2026
95d5a38
feat: make DNS and DHCP container ports configurable
madic-creates Jan 12, 2026
91c49bd
fix(examples): add dnsPolicy for hostNetwork dhcphelper deployment
madic-creates Jan 12, 2026
07110ac
fix(examples): add podAffinity to dhcphelper for same-node scheduling
madic-creates Jan 12, 2026
28fa76a
feat(examples): enable rootless operation for dhcphelper
madic-creates Jan 15, 2026
6a8a3c1
feat(probes): make healthcheck commands configurable with documented …
madic-creates Jan 17, 2026
48ddb1a
fix(examples): update dhcphelper configuration and improve tc documen…
madic-creates Jan 17, 2026
c231978
fix(examples): reduce dhcphelper wait timeout from 65s to 30s
madic-creates Jan 17, 2026
7bd9b28
docs(examples): remove dhcphelper example configuration
madic-creates Mar 7, 2026
c17e7c9
feat: bump pihole version to 2026.02.0
madic-creates Mar 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 113 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Release Notes

This release brings significant improvements to the Pi-hole Helm chart, including modernized Kubernetes standards and enhanced secure DNS capabilities.

## Breaking Changes

### Standardized Kubernetes Labels
- **Selector labels have changed** from `app`/`release` to `app.kubernetes.io/name` and `app.kubernetes.io/instance`
- **Migration required**: Existing deployments must be fully uninstalled and reinstalled due to immutable selector fields
- All resources now use standardized labels following Helm best practices:
- `helm.sh/chart`
- `app.kubernetes.io/name`
- `app.kubernetes.io/instance`
- `app.kubernetes.io/version`
- `app.kubernetes.io/managed-by`

### Admin Password Configuration moved
- **`adminPassword` moved to `admin.password`** - The root-level `adminPassword` value has been moved into the `admin` section
- Update your values files: change `adminPassword: "xxx"` to `admin.password: "xxx"`

### DNS-over-HTTPS (DoH) Overhaul
- **Replaced cloudflared with dnscrypt-proxy** for encrypted DNS resolution
- Cloudflare deprecated the proxy-dns feature in cloudflared
- More flexible and feature-rich encrypted DNS solution

### Use same terminology as pihole
- renamed `whitelist` to `allowed` and `blacklist` to `denied` for inclusive terminology
- Update your values files:
- `whitelist: [...]` → `allowed: [...]`
- `blacklist: [...]` → `denied: [...]`

## Features

- add commonLabels option to apply labels to all deployed objects ([#347](https://github.com/MoJo2600/pihole-kubernetes/issues/347))

### Enhanced Health Probes
- **Added startup probes** for both Pi-hole and DoH containers
- Startup probes allow containers sufficient time to initialize before liveness/readiness probes begin
- Reduced `initialDelaySeconds` to 0 (startup probe handles the delay)
- Added DNS resolution check (`dig`) to probe commands for more accurate health detection
- Leads to faster pod startups (estimated around 80% or higher)

**Why this matters:**
- **No arbitrary wait times** - Previously, `initialDelaySeconds` had to be set to an estimated value. If the container was ready faster, you waited unnecessarily. If slower, health checks failed.
- **Adaptive initialization** - Startup probes actively check if the container is ready. Once successful, liveness/readiness probes take over immediately.
- **Accurate health detection** - The `dig` command verifies actual DNS functionality rather than just open TCP ports. An open port doesn't mean DNS is working.
- **Faster failure detection** - With `failureThreshold: 3`, unhealthy pods are detected and restarted more quickly.

### ServiceAccount Support
- Added configurable ServiceAccount with optional token mounting
- Better security controls for pod identity management

**Why this matters:**
- **Principle of Least Privilege** - Pods can run with a dedicated ServiceAccount instead of the default account, which often has excessive permissions.
- **Controllable token mounting** - `automountServiceAccountToken: false` prevents unnecessary API credentials from being mounted into the pod (security risk if compromised).
- **RBAC integration** - Enables fine-grained permissions if Pi-hole needs Kubernetes API access (e.g., for service discovery).
- **Audit compliance** - Dedicated ServiceAccounts enable better tracking of API access in audit logs.

### Security Context Support (Experimental)
- Added `podSecurityContext` and `containerSecurityContext` configuration options
- Backwards compatible with existing `privileged` and `capabilities` values
- Documented Pi-hole limitations regarding rootless operation

**Why this matters:**
- **Explicit security configuration** - Allows setting `privileged: false` to prevent full host access.
- **Seccomp profiles** - Pod-level `seccompProfile: RuntimeDefault` enables syscall filtering.
- **Transparency** - Documentation explains why detailed capability management provides limited benefit for Pi-hole (requires 10+ capabilities including NET_ADMIN, NET_RAW, SETUID, etc.).

**Important limitations:**
- Pi-hole Docker image requires root at startup for gravity database, crontab, and setcap operations
- `runAsNonRoot`, `runAsUser`, `runAsGroup` are **not supported**
- `allowPrivilegeEscalation: false` is **not supported** (required for setcap)
- `readOnlyRootFilesystem: true` is **not supported** (Pi-hole writes to /etc/pihole, /var/log)

### Dynamic NOTES.txt
- Installation notes now dynamically reflect actual service configuration
- Context-aware access instructions based on service type (Ingress, LoadBalancer, NodePort, ClusterIP)
- Conditional DHCP section and improved kubectl commands with namespace flags

### Helm Chart Modernization
- Upgraded Helm chart to apiVersion v2
- Optimized `.helmignore` to reduce packaged chart size

## Improvements

### DNS Testing
- Extended Helm tests with DNS resolution verification
- New `test-pihole-dns.yaml` validates Pi-hole DNS functionality via nslookup queries

### Documentation
- Added `loadBalancerIP` deprecation notice for Kubernetes 1.24+
- Documented recommended migration path using cloud provider annotations (e.g., `metallb.universe.tf/loadBalancerIPs` for MetalLB)

## Migration Guide

Due to the breaking change in selector labels, you must perform a full reinstall:

```bash
# 1. Backup your Pi-hole configuration (if using persistent storage)
kubectl cp <namespace>/<pihole-pod>:/etc/pihole ./pihole-backup

# 2. Backup your helm custom values
helm get values pihole -n <namespace> > pihole-values-backup.yaml

# 3. Uninstall existing release
helm uninstall pihole -n <namespace>

# 4. Delete the PersistentVolumeClaim if you want a fresh start (optional)
kubectl delete pvc <release-name>-pihole -n <namespace>

# 5. Install new version
helm install <release-name> mojo2600/pihole -n <namespace> -f pihole-values-backup.yaml
```
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
[![All Contributors](https://img.shields.io/badge/all_contributors-27-blue.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

> [!IMPORTANT]
> [!IMPORTANT]
> Additional maintainers wanted! I need help maintaining this chart. Please see [the discussion here](https://github.com/MoJo2600/pihole-kubernetes/discussions/393)

> [!WARNING]
> **v3 Proposal Repository**: This Repository contains an unfinished rewrite with breaking changes intended as a proposal for v3. Do not use in production. For the stable version, please use the https://github.com/MoJo2600/pihole-kubernetes. For an overview of the changes, take a look at the [CHANGELOG.md](CHANGELOG.md).

[Helm](https://helm.sh) repo for different charts which can be installed on [Kubernetes](https://kubernetes.io)

Further documentation including chart keys, types, and default values is at https://hub.helm.sh/charts/mojo2600/pihole
Expand All @@ -28,6 +31,28 @@ helm repo update
```


## Troubleshooting

### pihole-FTL: no process found (with hostNetwork: true)

When deploying Pi-hole with `hostNetwork: true`, the container may crash with the error `pihole-FTL: no process found`.

**Cause:** A port required by FTL (e.g., UDP port 53, 67, or others) is already in use on the host, preventing the FTL process from binding.

**Solutions:**

1. **DHCP Helper Approach** (recommended for DHCP):
- Deploy Pi-hole WITHOUT `hostNetwork: true`
- Use a separate [dhcphelper](https://github.com/homeall/dhcphelper) pod with host networking
- The helper receives DHCP broadcasts and forwards them as unicast to Pi-hole
- See the complete example: [charts/pihole/examples/dhcphelper/](charts/pihole/examples/dhcphelper/)

2. **LoadBalancer with MetalLB**:
- Use MetalLB to expose services without host networking
- Note: This does NOT work for DHCP (Layer 2 broadcast limitation)

**Why DHCP requires special handling:** DHCP operates at OSI Layer 2 using broadcast messages. Standard Kubernetes networking and LoadBalancers work at Layer 3 (IP) and cannot forward these broadcasts. Either the Pi-hole pod needs direct access to the host network, or a relay/helper must bridge the gap.

## Contributors ✨

Thanks goes to these wonderful people:
Expand Down
9 changes: 9 additions & 0 deletions charts/pihole/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,17 @@
# Various IDEs
.project
.idea/
.vscode/
*.tmproj

# Backup and temporary files
*.orig

# CI/CD files
.github/
.gitlab-ci.yml
.travis.yml

# Manually added entries
ci/
examples/
Expand Down
5 changes: 3 additions & 2 deletions charts/pihole/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
apiVersion: v1
apiVersion: v2
type: application
description: Installs pihole in kubernetes
home: https://github.com/MoJo2600/pihole-kubernetes/tree/main/charts/pihole
name: pihole
appVersion: "2025.11.1"
appVersion: "2026.02.0"
# Do not touch will be updated during release
version: 2.35.0
sources:
Expand Down
Loading