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

bug: PiHole not being auto assigned ingress class #4

Open
StevenAlexanderJohnson opened this issue Sep 17, 2024 · 1 comment
Open

Comments

@StevenAlexanderJohnson
Copy link

I'm using newer versions of PiHole and Ingress-Nginx so I'm not certain if that's the case for the older versions.

In my case I had set the ingress-nginx class to be the default as seen in the video, but when running: kubectl get ing -A pihole-system was not assigned a class.

Looking at the git repo for mojo2600/pihole, there is a field under ingress called ingressClassName, which you can define using the name set in nginx-internal.values.yaml.

I didn't create a PR because this repo uses older versions.

@StevenAlexanderJohnson
Copy link
Author

StevenAlexanderJohnson commented Sep 17, 2024

For more details:
I used the same helmfile but changed the versions,

repositories:
  - name: longhorn
    url: https://charts.longhorn.io
  - name: metallb
    url: https://metallb.github.io/metallb
  - name: mojo2600
    url: https://mojo2600.github.io/pihole-kubernetes/
  - name: ingress-nginx
    url: https://kubernetes.github.io/ingress-nginx
---
releases:
  - name: longhorn
    namespace: longhorn-system
    chart: longhorn/longhorn
    version: 1.7.1

  - name: metallb
    chart: metallb/metallb
    namespace: metallb-system
    version: 0.14.5

  - name: pihole
    namespace: pihole-system
    chart: mojo2600/pihole
    version: 2.26.1
    values:
      - ./values/pihole.values.yaml

  - name: ingress-nginx-internal
    namespace: nginx-system
    chart: ingress-nginx/ingress-nginx
    version: 4.11.2
    values:
      - ./values/nginx-internal.values.yaml

My nginx-internal.values.yaml was the same, but I removed the parameters field.

I changed the pihole.values.yaml file to look like this:

---
DNS1:
  192.168.0.1
persistentVolumeClaim:
  enabled: true
  storageClassName: longhorn
  size: 1Gi
ingress:
  enabled: true
  ingressClassName: nginx-internal
  hosts:
    - "pihole.home"
serviceWeb:
  loadBalancerIP: 192.168.0.240
  annotations:
    metallb.universe.tf/allow-shared-ip: pihole-svc
  type: LoadBalancer
serviceDns:
  loadBalancerIP: 192.168.0.240
  annotations:
    metallb.universe.tf/allow-shared-ip: pihole-svc
  type: LoadBalancer
replicaCount: 1

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

1 participant