kubealex / k8s-mediaserver-operator

Repository for k8s Mediaserver Operator project
MIT License
563 stars 77 forks source link

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

Open KnightDoom opened 1 year ago

KnightDoom commented 1 year ago

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:

Expected behavior All ingresses should work.

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

Environment:

Additional context Add any other context about the problem here.

KnightDoom commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

KnightDoom commented 1 year ago

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 commented 1 year ago

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

JosefWN commented 1 year ago

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: https://github.com/kubealex/k8s-mediaserver-operator/pull/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 commented 1 year ago

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: