nicholaswilde / helm-charts

My collection of Helm charts.
https://artifacthub.io/packages/search?repo=nicholaswilde
Apache License 2.0
70 stars 32 forks source link

[novnc] ingress configuration #7

Closed iptizer closed 3 years ago

iptizer commented 3 years ago

Details

Helm chart name and version:

Container name and tag:

What steps did you take and what happened:

Implemented chart, minor mods, but more or less this: https://github.com/nicholaswilde/helm-charts/blob/main/charts/novnc/values.yaml#L31

What did you expect to happen:

Access through ingress should work.

Problem description:

Keeping as suggested throws the following error:

Error: UPGRADE FAILED: error validating "": error validating data: ValidationError(Ingress.spec.rules[0].http.paths[0]): unknown field "pathType" in io.k8s.api.networking.v1beta1.HTTPIngressPath

Removing just the pathType, meaning the following, shows the following:

ingress:
  enabled: true
  annotations:
    nginx.ingress.kubernetes.io/whitelist-source-range: "10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"
  hosts:
    - host: "vnc.mydomain.de"
      paths:
        - path: /vnc.html
          #pathType: Prefix

only_vnc html

When modifying ingress config as follows, it looks like it works, but does not connect

ingress:
  enabled: true
  annotations:
    nginx.ingress.kubernetes.io/whitelist-source-range: "10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"
  hosts:
    - host: "vnc.mydomain.de"
      paths:
        - path: /
          #pathType: Prefix

The novnc front page is displayed, but on click of connect, the following logs are thrown on the pod:

10.17.170.56 - - [03/Feb/2021 16:18:08] 10.17.170.56: Plain non-SSL (ws://) WebSocket connection
10.17.170.56 - - [03/Feb/2021 16:18:08] 10.17.170.56: Path: '/websockify'
10.17.170.56 - - [03/Feb/2021 16:18:08] connecting to: localhost:5900
10.17.170.56 - - [03/Feb/2021 16:18:08] Failed to connect to localhost:5900

Hints welcome :).

nicholaswilde commented 3 years ago

Which helm and kubernetes versions are you using?

nicholaswilde commented 3 years ago

Added REMOTE_HOST and REMOTE_PORT to novnc:1.2.0-ls2.

Added REMOTE_HOST and REMOTE_PORT to chart novnc-0.1.2 and fixed path in values.yaml (f1ce4178783463a83cc7355e254974b07eaa8ddb).

Still need information about helm and kubernetes versions.

iptizer commented 3 years ago

Which helm and kubernetes versions are you using?

kubernetes 1.17 helm 3.x

iptizer commented 3 years ago

Okay, I think I found the issue here. As I am new to novnc I am not aware of all the concepts.

Is it the case, that REMOTE_HOST has to point to the VNC destination server? Presumeably... :)

I though that the remote host can be configured on demand within the website. I will test that and come back to you. But I think this is the case. So presumeably everything works as expected :). Thanks for your help on this! Great work with this helm chart!!