Skip to content

Commit

Permalink
Remove loadBalancerIP
Browse files Browse the repository at this point in the history
  • Loading branch information
DerRockWolf committed Dec 3, 2023
1 parent 98c3720 commit a1802c4
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 84 deletions.
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: "2023.05.2"
version: 2.19.0
version: 3.0.0
sources:
- https://github.com/MoJo2600/pihole-kubernetes/tree/master/charts/pihole
- https://pi-hole.net/
Expand Down
42 changes: 19 additions & 23 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.9.3](https://img.shields.io/badge/Version-2.9.3-informational?style=flat-square) ![AppVersion: 2022.09.1](https://img.shields.io/badge/AppVersion-2022.09.1-informational?style=flat-square) <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
![Version: 3.0.0](https://img.shields.io/badge/Version-3.0.0-informational?style=flat-square) ![AppVersion: 2023.05.2](https://img.shields.io/badge/AppVersion-2023.05.2-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 @@ -50,15 +50,15 @@ persistentVolumeClaim:
enabled: true

serviceWeb:
loadBalancerIP: 192.168.178.252
annotations:
metallb.universe.tf/allow-shared-ip: pihole-svc
metallb.universe.tf/loadBalancerIPs: "192.168.178.252"
type: LoadBalancer

serviceDns:
loadBalancerIP: 192.168.178.252
annotations:
metallb.universe.tf/allow-shared-ip: pihole-svc
metallb.universe.tf/loadBalancerIPs: "192.168.178.252"
type: LoadBalancer
```

Expand Down Expand Up @@ -108,27 +108,27 @@ update your `values.yaml` and add a new configuration for this new service.
Before (In my case, with metallb):
```
serviceTCP:
loadBalancerIP: 192.168.178.252
annotations:
metallb.universe.tf/allow-shared-ip: pihole-svc
metallb.universe.tf/loadBalancerIPs: "192.168.178.252"
serviceUDP:
loadBalancerIP: 192.168.178.252
annotations:
metallb.universe.tf/allow-shared-ip: pihole-svc
metallb.universe.tf/loadBalancerIPs: "192.168.178.252"
```

After:
```
serviceWeb:
loadBalancerIP: 192.168.178.252
annotations:
metallb.universe.tf/allow-shared-ip: pihole-svc
metallb.universe.tf/loadBalancerIPs: "192.168.178.252"
serviceDns:
loadBalancerIP: 192.168.178.252
annotations:
metallb.universe.tf/allow-shared-ip: pihole-svc
metallb.universe.tf/loadBalancerIPs: "192.168.178.252"
```

Version 1.8.22 has switched from the deprecated ingress api `extensions/v1beta1` to the go forward version `networking.k8s.io/v1`. This means that your cluster must be running 1.19.x as this api is not available on older versions. If necessary to run on an older Kubernetes Version, it can be done by modifying the ingress.yaml and changing the api definition back. The backend definition would also change from:
Expand Down Expand Up @@ -173,9 +173,10 @@ The following table lists the configurable parameters of the pihole chart and th
| affinity | object | `{}` | |
| antiaff.avoidRelease | string | `"pihole1"` | Here you can set the pihole release (you set in `helm install <releasename> ...`) you want to avoid |
| antiaff.enabled | bool | `false` | set to true to enable antiaffinity (example: 2 pihole DNS in the same cluster) |
| antiaff.namespaces | list | `[]` | Here you can pass namespaces to be part of those inclueded in anti-affinity |
| antiaff.strict | bool | `true` | Here you can choose between preferred or required |
| antiaff.namespaces | '[]' | list of namespaces to include in anti-affinity settings
| blacklist | object | `{}` | list of blacklisted domains to import during initial start of the container |
| capabilities | object | `{}` | |
| customVolumes.config | object | `{}` | any volume type can be used here |
| customVolumes.enabled | bool | `false` | set this to true to enable custom volumes |
| dnsHostPort.enabled | bool | `false` | set this to true to enable dnsHostPort |
Expand All @@ -200,6 +201,7 @@ The following table lists the configurable parameters of the pihole chart and th
| doh.repository | string | `"crazymax/cloudflared"` | |
| doh.tag | string | `"latest"` | |
| 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"` |
| extraContainers | list | `[]` | |
| 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. |
| extraInitContainers | list | `[]` | any initContainers you might want to run before starting pihole |
Expand All @@ -226,39 +228,35 @@ The following table lists the configurable parameters of the pihole chart and th
| persistentVolumeClaim.annotations | object | `{}` | Annotations for the `PersitentVolumeClaim` |
| persistentVolumeClaim.enabled | bool | `false` | set to true to use pvc |
| podAnnotations | object | `{}` | Additional annotations for pods |
| podDisruptionBudget | object | `{"enabled":false,"minAvailable":1}` | configure a Pod Disruption Budget |
| podDisruptionBudget.enabled | bool | `false` | set to true to enable creating the PDB |
| podDisruptionBudget.minAvailable | int | `1` | minimum number of pods Kubernetes should try to have running at all times |
| podDnsConfig.enabled | bool | `true` | |
| podDnsConfig.nameservers[0] | string | `"127.0.0.1"` | |
| podDnsConfig.nameservers[1] | string | `"8.8.8.8"` | |
| podDnsConfig.policy | string | `"None"` | |
| privileged | string | `"false"` | should container run in privileged mode |
| capabilities | object | `{}` | Linux capabilities that container should run with |
| probes | object | `{"liveness":{"type": "httpGet","enabled":true,"failureThreshold":10,"initialDelaySeconds":60,"port":"http","scheme":"HTTP","timeoutSeconds":5},"readiness":{"enabled":true,"failureThreshold":3,"initialDelaySeconds":60,"port":"http","scheme":"HTTP","timeoutSeconds":5}}` | Probes configuration |
| probes.liveness.enabled | bool | `true` | Generate a liveness probe |
| probes.liveness.type | string | `httpGet` | Defines the type of liveness probe. (httpGet, command) |
| probes.liveness.command | list | [] | A list of commands to execute as a liveness probe (Requires `type` to be set to `command`) |
| probes | object | `{"liveness":{"enabled":true,"failureThreshold":10,"initialDelaySeconds":60,"port":"http","scheme":"HTTP","timeoutSeconds":5,"type":"httpGet"},"readiness":{"enabled":true,"failureThreshold":3,"initialDelaySeconds":60,"port":"http","scheme":"HTTP","timeoutSeconds":5}}` | Probes configuration |
| probes.liveness.type | string | `"httpGet"` | Generate a liveness probe 'type' defaults to httpGet, can be set to 'command' to use a command type liveness probe. |
| probes.readiness.enabled | bool | `true` | Generate a readiness probe |
| regex | object | `{}` | list of blacklisted regex expressions to import during initial start of the container |
| replicaCount | int | `1` | The number of replicas |
| resources | object | `{}` | lines, adjust them as necessary, and remove the curly braces after 'resources:'. |
| serviceDhcp | object | `{"annotations":{},"enabled":true,"externalTrafficPolicy":"Local","loadBalancerIP":"","loadBalancerIPv6":"","nodePort":"","port":67,"type":"NodePort"}` | Configuration for the DHCP service on port 67 |
| serviceDhcp | object | `{"annotations":{},"enabled":true,"externalTrafficPolicy":"Local","nodePort":"","port":67,"type":"NodePort"}` | Configuration for the DHCP service on port 67 |
| serviceDhcp.annotations | object | `{}` | Annotations for the DHCP service |
| serviceDhcp.enabled | bool | `true` | Generate a Service resource for DHCP traffic |
| serviceDhcp.externalTrafficPolicy | string | `"Local"` | `spec.externalTrafficPolicy` for the DHCP Service |
| serviceDhcp.loadBalancerIP | string | `""` | A fixed `spec.loadBalancerIP` for the DHCP Service |
| serviceDhcp.loadBalancerIPv6 | string | `""` | A fixed `spec.loadBalancerIP` for the IPv6 DHCP Service |
| serviceDhcp.nodePort | string | `""` | Optional node port for the DHCP service |
| serviceDhcp.port | int | `67` | The port of the DHCP service |
| serviceDhcp.type | string | `"NodePort"` | `spec.type` for the DHCP Service |
| serviceDns | object | `{"annotations":{},"externalTrafficPolicy":"Local","loadBalancerIP":"","loadBalancerIPv6":"","mixedService":false,"nodePort":"","port":53,"type":"NodePort"}` | Configuration for the DNS service on port 53 |
| serviceDns | object | `{"annotations":{},"externalTrafficPolicy":"Local","mixedService":false,"nodePort":"","port":53,"type":"NodePort"}` | Configuration for the DNS service on port 53 |
| serviceDns.annotations | object | `{}` | Annotations for the DNS service |
| serviceDns.externalTrafficPolicy | string | `"Local"` | `spec.externalTrafficPolicy` for the DHCP Service |
| serviceDns.loadBalancerIP | string | `""` | A fixed `spec.loadBalancerIP` for the DNS Service |
| serviceDns.loadBalancerIPv6 | string | `""` | A fixed `spec.loadBalancerIP` for the IPv6 DNS Service |
| serviceDns.mixedService | bool | `false` | deploys a mixed (TCP + UDP) Service instead of separate ones |
| serviceDns.nodePort | string | `""` | Optional node port for the DNS service |
| serviceDns.port | int | `53` | The port of the DNS service |
| serviceDns.type | string | `"NodePort"` | `spec.type` for the DNS Service |
| serviceWeb | object | `{"annotations":{},"externalTrafficPolicy":"Local","http":{"enabled":true,"nodePort":"","port":80},"https":{"enabled":true,"nodePort":"","port":443},"loadBalancerIP":"","loadBalancerIPv6":"","type":"ClusterIP"}` | Configuration for the web interface service |
| serviceWeb | object | `{"annotations":{},"externalTrafficPolicy":"Local","http":{"enabled":true,"nodePort":"","port":80},"https":{"enabled":true,"nodePort":"","port":443},"type":"ClusterIP"}` | Configuration for the web interface service |
| serviceWeb.annotations | object | `{}` | Annotations for the DHCP service |
| serviceWeb.externalTrafficPolicy | string | `"Local"` | `spec.externalTrafficPolicy` for the web interface Service |
| serviceWeb.http | object | `{"enabled":true,"nodePort":"","port":80}` | Configuration for the HTTP web interface listener |
Expand All @@ -269,8 +267,6 @@ The following table lists the configurable parameters of the pihole chart and th
| serviceWeb.https.enabled | bool | `true` | Generate a service for HTTPS traffic |
| serviceWeb.https.nodePort | string | `""` | Optional node port for the web HTTPS service |
| serviceWeb.https.port | int | `443` | The port of the web HTTPS service |
| serviceWeb.loadBalancerIP | string | `""` | A fixed `spec.loadBalancerIP` for the web interface Service |
| serviceWeb.loadBalancerIPv6 | string | `""` | A fixed `spec.loadBalancerIP` for the IPv6 web interface Service |
| serviceWeb.type | string | `"ClusterIP"` | `spec.type` for the web interface Service |
| strategyType | string | `"RollingUpdate"` | The `spec.strategyTpye` for updates |
| tolerations | list | `[]` | |
Expand Down Expand Up @@ -399,4 +395,4 @@ Thanks goes to these wonderful people:
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.10.0](https://github.com/norwoodj/helm-docs/releases/v1.10.0)
Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
12 changes: 6 additions & 6 deletions charts/pihole/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ persistentVolumeClaim:
enabled: true

serviceWeb:
loadBalancerIP: 192.168.178.252
annotations:
metallb.universe.tf/allow-shared-ip: pihole-svc
metallb.universe.tf/loadBalancerIPs: "192.168.178.252"
type: LoadBalancer

serviceDns:
loadBalancerIP: 192.168.178.252
annotations:
metallb.universe.tf/allow-shared-ip: pihole-svc
metallb.universe.tf/loadBalancerIPs: "192.168.178.252"
type: LoadBalancer
```

Expand Down Expand Up @@ -104,27 +104,27 @@ update your `values.yaml` and add a new configuration for this new service.
Before (In my case, with metallb):
```
serviceTCP:
loadBalancerIP: 192.168.178.252
annotations:
metallb.universe.tf/allow-shared-ip: pihole-svc
metallb.universe.tf/loadBalancerIPs: "192.168.178.252"

serviceUDP:
loadBalancerIP: 192.168.178.252
annotations:
metallb.universe.tf/allow-shared-ip: pihole-svc
metallb.universe.tf/loadBalancerIPs: "192.168.178.252"
```

After:
```
serviceWeb:
loadBalancerIP: 192.168.178.252
annotations:
metallb.universe.tf/allow-shared-ip: pihole-svc
metallb.universe.tf/loadBalancerIPs: "192.168.178.252"

serviceDns:
loadBalancerIP: 192.168.178.252
annotations:
metallb.universe.tf/allow-shared-ip: pihole-svc
metallb.universe.tf/loadBalancerIPs: "192.168.178.252"
```

Version 1.8.22 has switched from the deprecated ingress api `extensions/v1beta1` to the go forward version `networking.k8s.io/v1`. This means that your cluster must be running 1.19.x as this api is not available on older versions. If necessary to run on an older Kubernetes Version, it can be done by modifying the ingress.yaml and changing the api definition back. The backend definition would also change from:
Expand Down
6 changes: 3 additions & 3 deletions charts/pihole/examples/k3s-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ persistentVolumeClaim:
enabled: true

serviceWeb:
loadBalancerIP: 192.168.178.201
annotations:
metallb.universe.tf/allow-shared-ip: pihole-svc
metallb.universe.tf/loadBalancerIPs: "192.168.178.201"
type: LoadBalancer

serviceDns:
loadBalancerIP: 192.168.178.201
annotations:
metallb.universe.tf/allow-shared-ip: pihole-svc
metallb.universe.tf/loadBalancerIPs: "192.168.178.201"
type: LoadBalancer

serviceDhcp:
loadBalancerIP: 192.168.178.201
annotations:
metallb.universe.tf/allow-shared-ip: pihole-svc
metallb.universe.tf/loadBalancerIPs: "192.168.178.201"
type: LoadBalancer

podDnsConfig:
Expand Down
5 changes: 2 additions & 3 deletions charts/pihole/examples/metallb-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ persistentVolumeClaim:
enabled: true

serviceTCP:
loadBalancerIP: 192.168.178.253
annotations:
metallb.universe.tf/address-pool: network-services
metallb.universe.tf/allow-shared-ip: pihole-svc
metallb.universe.tf/loadBalancerIPs: "192.168.178.253"

serviceUDP:
loadBalancerIP: 192.168.178.253
annotations:
metallb.universe.tf/address-pool: network-services
metallb.universe.tf/allow-shared-ip: pihole-svc

metallb.universe.tf/loadBalancerIPs: "192.168.178.253"
3 changes: 0 additions & 3 deletions charts/pihole/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ data:
{{- range .Values.dnsmasq.customDnsEntries }}
{{ . }}
{{- end }}
{{- if .Values.serviceDns.loadBalancerIP }}
dhcp-option=6,{{ .Values.serviceDns.loadBalancerIP }}
{{- end }}
{{- range .Values.dnsmasq.customSettings }}
{{ . }}
{{- end }}
Expand Down
6 changes: 0 additions & 6 deletions charts/pihole/templates/service-dhcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ spec:
- IPv6
ipFamilyPolicy: PreferDualStack
{{- end }}
{{- if .Values.serviceDhcp.loadBalancerIP }}
loadBalancerIP: {{ .Values.serviceDhcp.loadBalancerIP }}
{{- end }}
{{- if or (eq .Values.serviceDhcp.type "NodePort") (eq .Values.serviceDhcp.type "LoadBalancer") }}
externalTrafficPolicy: {{ .Values.serviceDhcp.externalTrafficPolicy }}
{{- end }}
Expand Down Expand Up @@ -57,9 +54,6 @@ spec:
ipFamilies:
- IPv6
ipFamilyPolicy: SingleStack
{{- if .Values.serviceDhcp.loadBalancerIPv6 }}
loadBalancerIP: {{ .Values.serviceDhcp.loadBalancerIPv6 }}
{{- end }}
{{- if or (eq .Values.serviceDhcp.type "NodePort") (eq .Values.serviceDhcp.type "LoadBalancer") }}
externalTrafficPolicy: {{ .Values.serviceDhcp.externalTrafficPolicy }}
{{- end }}
Expand Down
6 changes: 0 additions & 6 deletions charts/pihole/templates/service-dns-tcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ spec:
- IPv6
ipFamilyPolicy: PreferDualStack
{{- end }}
{{- if .Values.serviceDns.loadBalancerIP }}
loadBalancerIP: {{ .Values.serviceDns.loadBalancerIP }}
{{- end }}
{{- if or (eq .Values.serviceDns.type "NodePort") (eq .Values.serviceDns.type "LoadBalancer") }}
externalTrafficPolicy: {{ .Values.serviceDns.externalTrafficPolicy }}
{{- end }}
Expand Down Expand Up @@ -63,9 +60,6 @@ spec:
ipFamilies:
- IPv6
ipFamilyPolicy: SingleStack
{{- if .Values.serviceDns.loadBalancerIPv6 }}
loadBalancerIP: {{ .Values.serviceDns.loadBalancerIPv6 }}
{{- end }}
{{- if or (eq .Values.serviceDns.type "NodePort") (eq .Values.serviceDns.type "LoadBalancer") }}
externalTrafficPolicy: {{ .Values.serviceDns.externalTrafficPolicy }}
{{- end }}
Expand Down
6 changes: 0 additions & 6 deletions charts/pihole/templates/service-dns-udp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ spec:
- IPv6
ipFamilyPolicy: PreferDualStack
{{- end }}
{{- if .Values.serviceDns.loadBalancerIP }}
loadBalancerIP: {{ .Values.serviceDns.loadBalancerIP }}
{{- end }}
{{- if or (eq .Values.serviceDns.type "NodePort") (eq .Values.serviceDns.type "LoadBalancer") }}
externalTrafficPolicy: {{ .Values.serviceDns.externalTrafficPolicy }}
{{- end }}
Expand Down Expand Up @@ -57,9 +54,6 @@ spec:
ipFamilies:
- IPv6
ipFamilyPolicy: SingleStack
{{- if .Values.serviceDns.loadBalancerIPv6 }}
loadBalancerIP: {{ .Values.serviceDns.loadBalancerIPv6 }}
{{- end }}
{{- if or (eq .Values.serviceDns.type "NodePort") (eq .Values.serviceDns.type "LoadBalancer") }}
externalTrafficPolicy: {{ .Values.serviceDns.externalTrafficPolicy }}
{{- end }}
Expand Down
6 changes: 0 additions & 6 deletions charts/pihole/templates/service-dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ metadata:
{{- end }}
spec:
type: {{ .Values.serviceDns.type }}
{{- if .Values.serviceDns.loadBalancerIP }}
loadBalancerIP: {{ .Values.serviceDns.loadBalancerIP }}
{{- end }}
{{- if or (eq .Values.serviceDns.type "NodePort") (eq .Values.serviceDns.type "LoadBalancer") }}
externalTrafficPolicy: {{ .Values.serviceDns.externalTrafficPolicy }}
{{- end }}
Expand Down Expand Up @@ -64,9 +61,6 @@ spec:
ipFamilies:
- IPv6
ipFamilyPolicy: SingleStack
{{- if .Values.serviceDns.loadBalancerIPv6 }}
loadBalancerIP: {{ .Values.serviceDns.loadBalancerIPv6 }}
{{- end }}
{{- if or (eq .Values.serviceDns.type "NodePort") (eq .Values.serviceDns.type "LoadBalancer") }}
externalTrafficPolicy: {{ .Values.serviceDns.externalTrafficPolicy }}
{{- end }}
Expand Down
6 changes: 0 additions & 6 deletions charts/pihole/templates/service-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ spec:
- IPv6
ipFamilyPolicy: PreferDualStack
{{- end }}
{{- if .Values.serviceWeb.loadBalancerIP }}
loadBalancerIP: {{ .Values.serviceWeb.loadBalancerIP }}
{{- end }}
{{- if or (eq .Values.serviceWeb.type "NodePort") (eq .Values.serviceWeb.type "LoadBalancer") }}
externalTrafficPolicy: {{ .Values.serviceWeb.externalTrafficPolicy }}
{{- end }}
Expand Down Expand Up @@ -72,9 +69,6 @@ spec:
ipFamilies:
- IPv6
ipFamilyPolicy: SingleStack
{{- if .Values.serviceWeb.loadBalancerIPv6 }}
loadBalancerIP: {{ .Values.serviceWeb.loadBalancerIPv6 }}
{{- end }}
{{- if or (eq .Values.serviceWeb.type "NodePort") (eq .Values.serviceWeb.type "LoadBalancer") }}
externalTrafficPolicy: {{ .Values.serviceWeb.externalTrafficPolicy }}
{{- end }}
Expand Down
15 changes: 0 additions & 15 deletions charts/pihole/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ serviceDns:
# -- `spec.externalTrafficPolicy` for the DHCP Service
externalTrafficPolicy: Local

# -- A fixed `spec.loadBalancerIP` for the DNS Service
loadBalancerIP: ""
# -- A fixed `spec.loadBalancerIP` for the IPv6 DNS Service
loadBalancerIPv6: ""

# -- Annotations for the DNS service
annotations:
{}
Expand All @@ -77,11 +72,6 @@ serviceDhcp:
# -- `spec.externalTrafficPolicy` for the DHCP Service
externalTrafficPolicy: Local

# -- A fixed `spec.loadBalancerIP` for the DHCP Service
loadBalancerIP: ""
# -- A fixed `spec.loadBalancerIP` for the IPv6 DHCP Service
loadBalancerIPv6: ""

# -- Annotations for the DHCP service
annotations:
{}
Expand Down Expand Up @@ -118,11 +108,6 @@ serviceWeb:
# -- `spec.externalTrafficPolicy` for the web interface Service
externalTrafficPolicy: Local

# -- A fixed `spec.loadBalancerIP` for the web interface Service
loadBalancerIP: ""
# -- A fixed `spec.loadBalancerIP` for the IPv6 web interface Service
loadBalancerIPv6: ""

# -- Annotations for the DHCP service
annotations:
{}
Expand Down

0 comments on commit a1802c4

Please sign in to comment.