travisghansen / kubernetes-pfsense-controller

Integrate Kubernetes and pfSense

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP Fatal error: Uncaught Error: Only variables can be passed by reference in ... DNSResourceTrait.php:75

dspereira-avlino opened this issue · comments

Hello Travis,

I'm trying to set this up but unfortunately, I'm getting the following error:

2021-02-09T17:56:40+00:00 store successfully initialized
2021-02-09T17:56:41+00:00 controller config loaded/updated
2021-02-09T17:56:41+00:00 loading plugin pfsense-dns-ingresses
2021-02-09T17:56:41+00:00 loading plugin pfsense-dns-services
PHP Warning: Illegal string offset 'hosts' in phar:///usr/local/bin/kubernetes-pfsense-controller/src/KubernetesPfSenseController/Plugin/DNSResourceTrait.php on line 71
PHP Warning: Illegal string offset 'hosts' in phar:///usr/local/bin/kubernetes-pfsense-controller/src/KubernetesPfSenseController/Plugin/DNSResourceTrait.php on line 72
2021-02-09T17:56:58+00:00 plugin (pfsense-dns-services): successfully reloaded dnsmasq service
2021-02-09T17:57:07+00:00 plugin (pfsense-dns-services): successfully reloaded unbound service
2021-02-09T17:57:09+00:00 plugin (pfsense-dns-services): successfully reloaded DHCP service
2021-02-09T17:57:10+00:00 plugin (pfsense-dns-ingresses): setting hostname entry: Host - vsphere-cluster.xxxxxx.dc, IP - 172.16.1.251
PHP Warning: Illegal string offset 'hosts' in phar:///usr/local/bin/kubernetes-pfsense-controller/src/KubernetesPfSenseController/Plugin/DNSResourceTrait.php on line 71
PHP Warning: Illegal string offset 'hosts' in phar:///usr/local/bin/kubernetes-pfsense-controller/src/KubernetesPfSenseController/Plugin/DNSResourceTrait.php on line 72
PHP Warning: Illegal string offset 'hosts' in phar:///usr/local/bin/kubernetes-pfsense-controller/src/KubernetesPfSenseController/Plugin/DNSResourceTrait.php on line 75
PHP Fatal error: Uncaught Error: Only variables can be passed by reference in phar:///usr/local/bin/kubernetes-pfsense-controller/src/KubernetesPfSenseController/Plugin/DNSResourceTrait.php:75
Stack trace:
#0 phar:///usr/local/bin/kubernetes-pfsense-controller/vendor/travisghansen/kubernetes-controller-php/src/KubernetesController/Plugin/AbstractPlugin.php(108): KubernetesPfSenseController\Plugin\DNSIngresses->doAction()
#1 phar:///usr/local/bin/kubernetes-pfsense-controller/vendor/travisghansen/kubernetes-controller-php/src/KubernetesController/Controller.php(525): KubernetesController\Plugin\AbstractPlugin->invokeAction()
#2 phar:///usr/local/bin/kubernetes-pfsense-controller/controller.php(87): KubernetesController\Controller->main()
#3 /usr/local/bin/kubernetes-pfsense-controller(2): include('phar:///usr/loc...')
#4 {main}
thrown in phar:///usr/local/bin/kubernetes-pfsense-controller/src/KubernetesPfSenseController/Plugin/DNSResourceTrait.php on line 75
stream closed

This is happening with the following:

  • kubernetes-pfsense-controller: v0.3.3
  • pfsense: 2.4.5-RELEASE-p1

Also, the config is the following (I'm using the helm chart and just omitting the "pfsense" part here):

config:
  controller-id: "vsphere-cluster"
  enabled: true
  plugins:
    pfsense-dns-services:
      enabled: true
      serviceLabelSelector:
      serviceFieldSelector:
      #allowedHostRegex: "/.*/"
      dnsBackends:
        dnsmasq:
          enabled: true
        unbound:
          enabled: true
    pfsense-dns-ingresses:
      enabled: true
      ingressLabelSelector:
      ingressFieldSelector:
      # works in conjunction with the ingress annotation 'dns.pfsense.org/enabled'
      # if defaultEnabled is empty or true, you can disable specific ingresses by setting the annotation to false
      # if defaultEnabled is false, you can enable specific ingresses by setting the annotation to true
      defaultEnabled: true
      #allowedHostRegex: "/.*/"
      dnsBackends:
        dnsmasq:
          enabled: true
        unbound:
          enabled: true

Any ideas of what could be the problem?

Thanks,

Are you currently running dnsmasq or unbound?

I'm currently running DNS Resolver/unbound

Let’s start by setting enabled to false beneath both dnsmasq entries.

Yes, you were (obviously) right, I should have checked that better instead of blindlessly copying the config. Everything is working as expected now...

Thanks for the reply and for this awesome project!

Great! Glad it's working!