Skip to content

Commit

Permalink
Custom DoH liveness probe & better default check (#220)
Browse files Browse the repository at this point in the history
* Make doh liveness probe customizable
* fix: Adjusted workflow trigger
* fix: removed doc generation, generated docs manually

Co-authored-by: bwulf <bwulf@ntent.com>
Co-authored-by: Christian Erhardt <mail@mojo2k.de>
  • Loading branch information
3 people authored Jun 20, 2022
1 parent f31dbfa commit b763afb
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 28 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,15 @@
"contributions": [
"code"
]
},
{
"login": "mrwulf",
"name": "Brandon Wulf",
"avatar_url": "https://avatars.githubusercontent.com/u/2494769?v=4",
"profile": "https://github.com/mrwulf",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
39 changes: 19 additions & 20 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ on:
pull_request:
branches:
- master
paths:
- "charts/pihole/**"
- "!**/README.md"
paths-ignore:
- "**/README.md"

jobs:

Expand Down Expand Up @@ -44,20 +43,20 @@ jobs:
- name: Run chart-testing (install)
run: ct install

generate-documentation:
runs-on: ubuntu-20.04
needs: lint-test
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}

- name: Generate Documentation
id: generate-documentation
run: |
docker run --rm --volume "$(pwd):/helm-docs" -u $(id -u) jnorwood/helm-docs:latest
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Bot: Update Documentation"
# generate-documentation:
# runs-on: ubuntu-20.04
# needs: lint-test
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# with:
# ref: ${{ github.head_ref }}

# - name: Generate Documentation
# id: generate-documentation
# run: |
# docker run --rm --volume "$(pwd):/helm-docs" -u $(id -u) jnorwood/helm-docs:latest
#
# - uses: stefanzweifel/git-auto-commit-action@v4
# with:
# commit_message: "Bot: Update Documentation"
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.02.1
version: 2.5.8
version: 2.6.0
sources:
- https://github.com/MoJo2600/pihole-kubernetes/tree/master/charts/pihole
- https://pi-hole.net/
Expand Down
9 changes: 5 additions & 4 deletions charts/pihole/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Installs pihole in kubernetes

![Version: 2.5.8](https://img.shields.io/badge/Version-2.5.8-informational?style=flat-square) ![AppVersion: 2022.02.1](https://img.shields.io/badge/AppVersion-2022.02.1-informational?style=flat-square) <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
![Version: 2.6.0](https://img.shields.io/badge/Version-2.6.0-informational?style=flat-square) ![AppVersion: 2022.02.1](https://img.shields.io/badge/AppVersion-2022.02.1-informational?style=flat-square) <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-27-blue.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

Expand Down Expand Up @@ -188,11 +188,12 @@ The following table lists the configurable parameters of the pihole chart and th
| doh.enabled | bool | `false` | set to true to enabled DNS over HTTPs via cloudflared |
| doh.envVars | object | `{}` | Here you can pass environment variables to the DoH container, for example: |
| doh.name | string | `"cloudflared"` | |
| doh.probes | object | `{"liveness":{"enabled":true,"failureThreshold":10,"initialDelaySeconds":60,"timeoutSeconds":5}}` | Probes configuration |
| doh.probes.liveness | object | `{"enabled":true,"failureThreshold":10,"initialDelaySeconds":60,"timeoutSeconds":5}` | Configure the healthcheck for the doh container |
| doh.probes | object | `{"liveness":{"enabled":true,"failureThreshold":10,"initialDelaySeconds":60,"probe":{"exec":{"command":["nslookup","-po=5053","cloudflare.com","127.0.0.1"]}},"timeoutSeconds":5}}` | Probes configuration |
| doh.probes.liveness | object | `{"enabled":true,"failureThreshold":10,"initialDelaySeconds":60,"probe":{"exec":{"command":["nslookup","-po=5053","cloudflare.com","127.0.0.1"]}},"timeoutSeconds":5}` | Configure the healthcheck for the doh container |
| doh.probes.liveness.enabled | bool | `true` | set to true to enable liveness probe |
| doh.probes.liveness.failureThreshold | int | `10` | defines the failure threshold for the liveness probe |
| doh.probes.liveness.initialDelaySeconds | int | `60` | defines the initial delay for the liveness probe |
| doh.probes.liveness.probe | object | `{"exec":{"command":["nslookup","-po=5053","cloudflare.com","127.0.0.1"]}}` | customize the liveness probe |
| doh.probes.liveness.timeoutSeconds | int | `5` | defines the timeout in secondes for the liveness probe |
| doh.pullPolicy | string | `"IfNotPresent"` | |
| doh.repository | string | `"crazymax/cloudflared"` | |
Expand All @@ -215,7 +216,7 @@ The following table lists the configurable parameters of the pihole chart and th
| maxUnavailable | int | `1` | The maximum number of Pods that can be unavailable during updating |
| monitoring.podMonitor | object | `{"enabled":false}` | Preferably adding prometheus scrape annotations rather than enabling podMonitor. |
| monitoring.podMonitor.enabled | bool | `false` | set this to true to enable podMonitor |
| monitoring.sidecar | object | `{"enabled":false,"image":{"pullPolicy":"IfNotPresent","repository":"ekofr/pihole-exporter","tag":"0.0.10"},"port":9617,"resources":{"limits":{"memory":"128Mi"}}}` | Sidecar configuration |
| monitoring.sidecar | object | `{"enabled":false,"image":{"pullPolicy":"IfNotPresent","repository":"ekofr/pihole-exporter","tag":"v0.3.0"},"port":9617,"resources":{"limits":{"memory":"128Mi"}}}` | Sidecar configuration |
| monitoring.sidecar.enabled | bool | `false` | set this to true to enable podMonitor as sidecar |
| nodeSelector | object | `{}` | |
| persistentVolumeClaim | object | `{"accessModes":["ReadWriteOnce"],"annotations":{},"enabled":false,"size":"500Mi"}` | `spec.PersitentVolumeClaim` configuration |
Expand Down
4 changes: 1 addition & 3 deletions charts/pihole/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,7 @@ spec:
{{- end }}
{{- if .Values.doh.probes.liveness.enabled }}
livenessProbe:
httpGet:
path: /metrics
port: 49312
{{ toYaml .Values.doh.probes.liveness.probe | indent 12 }}
initialDelaySeconds: {{ .Values.doh.probes.liveness.initialDelaySeconds }}
failureThreshold: {{ .Values.doh.probes.liveness.failureThreshold }}
timeoutSeconds: {{ .Values.doh.probes.liveness.timeoutSeconds }}
Expand Down
8 changes: 8 additions & 0 deletions charts/pihole/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,14 @@ doh:
liveness:
# -- set to true to enable liveness probe
enabled: true
# -- customize the liveness probe
probe:
exec:
command:
- nslookup
- -po=5053
- cloudflare.com
- '127.0.0.1'
# -- defines the initial delay for the liveness probe
initialDelaySeconds: 60
# -- defines the failure threshold for the liveness probe
Expand Down

0 comments on commit b763afb

Please sign in to comment.