MoJo2600 / pihole-kubernetes

PiHole on kubernetes
506 stars 178 forks source link

MixedProtocols - Mixed DNS Service #178

Closed muhlba91 closed 3 years ago

muhlba91 commented 3 years ago

Hi,

with the new feature gate MixedProtocolLBService from 1.20 onwards, mixed LB services are possible. Can #78 reopened and integrated through a setting (e.g. mixedDnsService)?

MoJo2600 commented 3 years ago

I reopened the issue, but this will be a breaking change I suppose?

muhlba91 commented 3 years ago

I was thinking about something like:

values.yaml:

serviceDns:
  mixedProtocol: false

The current service-dns-tcp.yaml and service-dns-udp.yaml I'd wrap in:

{{- if not .Values.serviceDns.mixedProtocol }}
...
{{- end }}

Additionally, create a new service-dns.yaml containing TCP and UDP wrapped around:

{{- if .Values.serviceDns.mixedProtocol }}
...
{{- end }}

This way, backwards compatibility is given and defaulting to the current behaviour of generating separate services, but users can opt-in to using a mixed service if they enabled the feature gate. What do you think?

MoJo2600 commented 3 years ago

Sounds very good!

muhlba91 commented 3 years ago

created a PR in #179 adding the flag as discussed.