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

[BR] Nginx Ingress does not allow reuse of the same host name. #67

Open
KnightDoom opened this issue Mar 17, 2023 · 7 comments
Open

[BR] Nginx Ingress does not allow reuse of the same host name. #67

KnightDoom opened this issue Mar 17, 2023 · 7 comments
Assignees

Comments

@KnightDoom
Copy link

Describe the bug
Nginx-ingress is reporting that the host name has been used in another ingress and such it cannot be allocated to another ingress.

To Reproduce
Steps to reproduce the behavior:

  • deploy the chart
  • try to access the ingresses.

Expected behavior
All ingresses should work.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment:

  • K8s version: K3S Latest
  • CNI Plugin: Flannel with Nginx ingress and metalLb
  • CSI Type: Longhorn?

Additional context
Add any other context about the problem here.

@KnightDoom
Copy link
Author

KnightDoom commented Mar 17, 2023

I will try to contribute to fix this if I can get confirmation that this issue can be replicated outside my setup. Please confirm.

@JosefWN
Copy link

JosefWN commented Mar 18, 2023

The chart's default works fine in ingress-nginx, you can have multiple ingresses with the same host provided they have different paths, i.e. you can't set all paths to /, rather you would use /prowlarr, /sonarr etc. Can you show us how you have modified the values for k8s-mediaserver-operator?

@KnightDoom
Copy link
Author

KnightDoom commented Mar 18, 2023

No modifications were made to the ingress information
https://justpaste.it/8v20j

@KnightDoom
Copy link
Author

KnightDoom commented Mar 18, 2023

NGINX-ingress image used:
image: nginx/nginx-ingress:3.0.2
Error in Nginx ingress logs.
2023-03-17T23:26:32.204288464Z I0317 23:26:32.204236 1 event.go:285] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"media", Name:"transmission", UID:"67c6184b-0058-44ee-a1d7-d22518a417f1", APIVersion:"networking.k8s.io/v1", ResourceVersion:"638161", FieldPath:""}): type: 'Warning' reason: 'Rejected' All hosts are taken by other resources

@KnightDoom
Copy link
Author

May I ask what version of NGINX is being employed by you?

@JosefWN
Copy link

JosefWN commented Mar 18, 2023

Ah, I'm using the Google's version of ingress-nginx: https://github.com/kubernetes/ingress-nginx

See if this works, by setting different hosts for the different services: #69

It's up to the maintainer if he wants to accept it or not, but I think it would make sense to make it configurable in general, not just because of this apparent limitation.

@KnightDoom
Copy link
Author

Yes, it works if use different host names.
I was planning on creating variables around this.

I just opted to disable all the ingresses and made this one
`
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: media-ingress
namespace: media
spec:
ingressClassName: nginx
rules:

  • host: media.home
    http:
    paths:
    • backend:
      service:
      name: sabnzbd-https
      port:
      number: 9090
      path: /sabnzbd
      pathType: Prefix
    • backend:
      service:
      name: radarr
      port:
      number: 7878
      path: /radarr
      pathType: Prefix
    • backend:
      service:
      name: jackett
      port:
      number: 9117
      path: /jackett
      pathType: Prefix
    • backend:
      service:
      name: sabnzbd
      port:
      number: 8080
      path: /sabnzbd2
      pathType: Prefix
    • backend:
      service:
      name: transmission-peer-udp
      port:
      number: 51413
      path: /transmission-peer-udp
      pathType: Prefix
    • backend:
      service:
      name: transmission-peer-tcp
      port:
      number: 51413
      path: /transmission-peer-tcp
      pathType: Prefix
    • backend:
      service:
      name: plex
      port:
      number: 32400
      path: /plex
      pathType: Prefix
    • backend:
      service:
      name: plex-kube-plex
      port:
      number: 32400
      path: /plex-kube-plex
      pathType: Prefix
    • backend:
      service:
      name: plex-kube-plex
      port:
      number: 80
      path: /plex-kube-plex-http
      pathType: Prefix
    • backend:
      service:
      name: plex-kube-plex
      port:
      number: 443
      path: /plex2
      pathType: Prefix
    • backend:
      service:
      name: transmission
      port:
      number: 9091
      path: /transmission
      pathType: Prefix
    • backend:
      service:
      name: sonarr
      port:
      number: 8989
      path: /sonarr
      pathType: Prefix
    • backend:
      service:
      name: prowlarr
      port:
      number: 9696
      path: /prowlarr
      pathType: Prefix
      '

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

3 participants