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

When exposing Nexus via NGINX Ingress on Kubernetes, users might see 413 request entity too large error #129

Closed
ricardozanini opened this issue Jul 17, 2020 · 9 comments
Assignees
Labels
RFE 🙏 Request For Enhancements won't do 👎 An issue or PR was declined

Comments

@ricardozanini
Copy link
Member

Is your feature request related to a problem? Please describe.
When users deploy Nexus and try to mvn:deploy, a 413 error might happen since the default NGINX Ingress is not correctly configured. Would be nice to deploy a ConfigMap with it to address this problem and let users to adjust the request size as their needs. Example:

kind: ConfigMap
apiVersion: v1
metadata:
  name: nginx-configuration
  namespace: ingress-nginx
  labels:
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/part-of: ingress-nginx
data:
  proxy-body-size: 10m

Describe the solution you'd like
Add a ConfigMap to address this problem, the configuration should not be modified/reconciled by the Operator

Describe alternatives you've considered
A workaround is to use NodePort instead or create a custom Ingress instead.

Additional context
Might be related: kubernetes/ingress-nginx#4825

@ricardozanini ricardozanini added the RFE 🙏 Request For Enhancements label Jul 17, 2020
@ricardozanini ricardozanini added this to the v0.3.0 milestone Jul 17, 2020
@ricardozanini ricardozanini self-assigned this Jul 17, 2020
@ricardozanini
Copy link
Member Author

@Kaitou786 FYI

@Kaitou786
Copy link
Collaborator

Kaitou786 commented Jul 20, 2020

@ricardozanini I think we can have a small section in README about it. As this would highly depend which kind of ingress-controller was used. The above solution works with ingress nginx which is easily integrated with Minikube but not with other controllers. The data needs to be added in the configMap for the ingress controller which is end-user responsibility and choice and not the ingress object (I think beyond our scope). For the ingress controller deployed on Minikube they attach a configMap with it in the kube-system namespace usually named as nginx-load-balancer-conf``. Though this can be confirmed via running kubectl get deploy/ingress-nginx-controller -o yaml -n kube-system | grep configand checking the name in--configmap` flag.

@ricardozanini
Copy link
Member Author

ricardozanini commented Jul 20, 2020

Have you managed to fix this error in your environment? Agreed to add a section in the README. The NGINX Ingress is the most common used on Kubernetes clusters, but not the only one, we can't cover all the scenarios. On the other hand, we can add a flag to the Networking interface for users to opt-in to use/indicate NGINX controller. I'll figure this out. We might be able to discover which Ingress type is being used and add this CM for users.

@Kaitou786
Copy link
Collaborator

Kaitou786 commented Jul 20, 2020

Yes, I just tried adding this info in the configMap and it worked in my enviornment =D. Need to check if there is option to have no limit when uploading the file. I tried with 500m it didn't work so I gave 1500m and it started working
EDIT: Directly define 0m(for no limit) in the config map works just fine. I though it should be only 0. but that gave an error * patch: Invalid value: "map[data:map[proxy-body-size:0]]": cannot convert int64 to string but setting it to 0m worked.

@ricardozanini
Copy link
Member Author

ricardozanini commented Jul 20, 2020

You might have to use m because of the Resource unit type. Whatever, glad that worked!

Perfect, then I'll add the CM if the Ingress is bound to a NGINX server.

@ricardozanini ricardozanini changed the title When exposing Nexus via Ingress on Kubernetes, users might see 413 request entity too large error When exposing Nexus via NGINX Ingress on Kubernetes, users might see 413 request entity too large error Jul 20, 2020
@Kaitou786
Copy link
Collaborator

You might have to use m because of the Resource unit type. Whatever, glad that worked!

Perfect, then I'll add the CM if the Ingress is bound to a NGINX server.

Great!

@ricardozanini
Copy link
Member Author

@Kaitou786 I'm considering to close this issue since it's a NGINX Ingress specific configuration, also the deployed CM on kube-system can address this configuration, right? The config you added was in this CM or you created a new one?

@Kaitou786
Copy link
Collaborator

Yes,the configuration was added to the CM that was created by the add-on in minikube. i just edited that to add the data field

@ricardozanini
Copy link
Member Author

Ok, I'll close this one then.

@ricardozanini ricardozanini added the won't do 👎 An issue or PR was declined label Oct 9, 2020
@ricardozanini ricardozanini removed this from the v0.4.0 milestone Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFE 🙏 Request For Enhancements won't do 👎 An issue or PR was declined
Projects
None yet
Development

No branches or pull requests

2 participants