Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

podDnsConfig enabled false still results in an Upstream DNS Server being checked #200

Open
lknite opened this issue Nov 28, 2021 · 2 comments

Comments

@lknite
Copy link

lknite commented Nov 28, 2021

I have my own dns server and for pihole to work the Upstream DNS Servers all need to be unchecked.

I'm setting:

podDnsConfig:
  enabled: false

but after deploying pihole i still need to log in and uncheck the default upstream server

@MoJo2600
Copy link
Owner

Ok, this seems to be a bug. I think charts/pihole/templates/deployment.yaml (Line 59) should be like this to enforce dnsPolicy: "None".

      {{- if .Values.podDnsConfig.enabled }}
      dnsPolicy: {{ .Values.podDnsConfig.policy }}
      {{- else }}
      dnsPolicy: "None"
      {{- end }}

Maybe you want to test this out an create a pull request if it is working for you?

@lknite
Copy link
Author

lknite commented Feb 21, 2022

Here's what I've discovered: If I only have DNS1 set in my values.conf, and not DNS2, then Google gets set automatically with 8.8.4.4. I can view the deployment and see this in the environment variable being set PIHOLE_DNS_. First I tried an empty DNS2, which didn't work, then I made up an invalid DNS2 and that worked.

In deployment.yaml it is checking if DNS2 exists, though, it always will because it is always set with a default value in values.yaml.

{{- if .Values.DNS1 }}
          - name: 'PIHOLE_DNS_'
            value: {{ if .Values.DNS2 }}{{ ( printf "%v;%v" .Values.DNS1 .Values.DNS2 ) | squote }}{{ else }}{{ .Values.DNS1 | squote }}{{ end }}

Currently, the README.md seems inaccurate, if someone uses podDnsConfig.enabled=false, and only specify a DNS1 they'll get the 8.8.4.4 DNS2 as a default. I'm not sure the best solution. Default DNS values of 8.8.8.8 and 8.8.4.4 are probably good, but it seems 8.8.4.4 should be removed as a default and perhaps added back in later if no DNS2 is specified and podDnsConfig.enabled=true. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants