Skip to content

Commit

Permalink
Add the ability to specify extra objects (manifests) (#210)
Browse files Browse the repository at this point in the history
* Add the ability to specify extra objects

This lets people specify arbitrary extra objects templated objects
to include. With something divers like Pi-hole users may want extra
configs or even Certificates (CRDs) to be created, as well as complex
ingress CRDs like IngressRoutes.

* semver: Bump chart minor version for new feature

Co-authored-by: Christian Erhardt <mail@mojo2k.de>
  • Loading branch information
fernferret and MoJo2600 authored Nov 23, 2022
1 parent 41118ff commit c96e9b0
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/pihole/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Installs pihole in kubernetes
home: https://github.com/MoJo2600/pihole-kubernetes/tree/master/charts/pihole
name: pihole
appVersion: "2022.11"
version: 2.9.4
version: 2.10.0
sources:
- https://github.com/MoJo2600/pihole-kubernetes/tree/master/charts/pihole
- https://pi-hole.net/
Expand Down
1 change: 1 addition & 0 deletions charts/pihole/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ The following table lists the configurable parameters of the pihole chart and th
| dualStack.enabled | bool | `false` | set this to true to enable creation of DualStack services or creation of separate IPv6 services if `serviceDns.type` is set to `"LoadBalancer"` |
| extraEnvVars | object | `{}` | extraEnvironmentVars is a list of extra enviroment variables to set for pihole to use |
| extraEnvVarsSecret | object | `{}` | extraEnvVarsSecret is a list of secrets to load in as environment variables. |
| extraObjects | list | `[]` | any extra kubernetes manifests you might want |
| extraVolumeMounts | object | `{}` | any extra volume mounts you might want |
| extraVolumes | object | `{}` | any extra volumes you might want |
| ftl | object | `{}` | values that should be added to pihole-FTL.conf |
Expand Down
4 changes: 4 additions & 0 deletions charts/pihole/templates/extra-manifests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ range .Values.extraObjects }}
---
{{ tpl (toYaml .) $ }}
{{ end }}
33 changes: 33 additions & 0 deletions charts/pihole/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,39 @@ extraVolumeMounts: {}
# mountPath: /etc/lighttpd/external.conf
# subPath: external.conf

# -- any extra kubernetes manifests you might want
extraObjects: []
# - apiVersion: v1
# kind: ConfigMap
# metadata:
# name: pi-hole-lighttpd-external-conf
# data:
# external.conf: |
# $HTTP["host"] =~ "example.foo" {
# # If we're using a non-standard host for pihole, ensure the Pi-hole
# # Block Page knows that this is not a blocked domain
# setenv.add-environment = ("fqdn" => "true")
#
# # Enable the SSL engine with a cert, only for this specific host
# $SERVER["socket"] == ":443" {
# ssl.engine = "enable"
# ssl.pemfile = "/etc/ssl/lighttpd-private/tls.crt"
# ssl.privkey = "/etc/ssl/lighttpd-private/tls.key"
# ssl.ca-file = "/etc/ssl/lighttpd-private/ca.crt"
# ssl.honor-cipher-order = "enable"
# ssl.cipher-list = "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"
# ssl.use-sslv2 = "disable"
# ssl.use-sslv3 = "disable"
# }
# }
#
# # Redirect HTTP to HTTPS
# $HTTP["scheme"] == "http" {
# $HTTP["host"] =~ ".*" {
# url.redirect = (".*" => "https://%0$0")
# }
# }

# -- Additional annotations for pods
podAnnotations: {}
# Example below allows Prometheus to scape on metric port (requires pihole-exporter sidecar enabled)
Expand Down

0 comments on commit c96e9b0

Please sign in to comment.