Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

[cetic/helm-nifi] ingress path other than / doesn't work #22

Closed
RabbidDog opened this issue Nov 13, 2019 · 5 comments
Closed

[cetic/helm-nifi] ingress path other than / doesn't work #22

RabbidDog opened this issue Nov 13, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@RabbidDog
Copy link

Describe the bug
the application UI should be accessible though the custom ingress path

Version of Helm and Kubernetes:
helm: v2.14.3
kubernetes: v1.15.1

What happened:
the chart allows us to set the ingress.path variable. I would like to host the application at a path other than '/'. for e.g. at '/demo-nifi'. So I expected that setting ingress.path: '/demo-nifi' would work without additional changes i.e the application ui will be available at host/demo-nifi/nifi and all calls would be made to host/demo-nifi/{..}. But all REST calls from the browser assume that the urls are host/{..}

What you expected to happen:
ui uses custom path set in ingress.path

How to reproduce it (as minimally and precisely as possible):
set ingress.path: /demo-nifi

Anything else we need to know:

if forgive any ignorance about possible advanced configuration that can be done to resolve this issue

@alexnuttinck alexnuttinck added the bug Something isn't working label Nov 15, 2019
@alexnuttinck
Copy link
Contributor

Hello @RabbidDog,

Thanks for your bug report, I was able to reproduce your bug.

When the ingress.path: /nifi, it works fine.
When i set another path (for instance /demo-nifi), nifi redirects me automatically to /nifi which ends in 404 error.

Maybe there is a configuration in nifi to use another path than /nifi.

@alexnuttinck
Copy link
Contributor

@RabbidDog
Copy link
Author

Thanks for the info. I will go through the docs and try to find a solution that works for me.

@RabbidDog
Copy link
Author

RabbidDog commented Jan 21, 2020

So, we finally decided to use nifi in our cluster and figured out that the following changes in the values.yaml will do the trick:

properties:
  safetyValve:
    nifi.web.proxy.context.path: /demo, /demo/nifi

for Traefik ingress controller

ingress:
  enabled: true
  path: /demo
  annotations:
    kubernetes.io/ingress.class: traefik
    traefik.ingress.kubernetes.io/rule-type: PathPrefixStrip
    ingress.kubernetes.io/custom-request-headers: X-ProxyContextPath:/demo||X-ProxyPort:80||X-ProxyScheme:http

For Nginx ingress controller

ingress:
  enabled: true
  path: /demo(/|$)(.*)
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/rewrite-target: /$2
    nginx.ingress.kubernetes.io/configuration-snippet: |
      proxy_set_header 'X-ProxyContextPath' '/demo';
      proxy_set_header 'X-ProxyPort' '80';
      proxy_set_header 'X-ProxyScheme' 'http';

@alexnuttinck
Copy link
Contributor

Thanks for the explanation @RabbidDog !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants