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

Websocket notification path/ingress #21

Closed
skysbsb opened this issue May 31, 2023 · 1 comment · Fixed by #25
Closed

Websocket notification path/ingress #21

skysbsb opened this issue May 31, 2023 · 1 comment · Fixed by #25

Comments

@skysbsb
Copy link

skysbsb commented May 31, 2023

Hey, i noticed that you are using ImplementationSpecific as default pathTypeWs at WS ingress part.
As shown here:

  path: "/"
  ## @param ingress.pathWs Path for the websocket ingress
  ##
  pathWs: "/notifications/hub"
  ## @param ingress.pathType Path type for the ingress
  ## Ref: https://kubernetes.io/docs/concepts/services-networking/ingress/
  ##
  pathType: "ImplementationSpecific"
  ## @param ingress.pathTypeWs Path type for the ingress
  ## Ref: https://kubernetes.io/docs/concepts/services-networking/ingress/
  ##
  pathTypeWs: "ImplementationSpecific"

And this is how you set the ingress template:

  rules:
    - host: {{ .Values.ingress.hostname | quote }}
      http:
        paths:
        - path: {{ .Values.ingress.path }}
          pathType: {{ .Values.ingress.pathType }}
          backend:
            service:
              name: {{ include "vaultwarden.fullname" . }}
              port:
                name: "http"
        {{- if .Values.websocket.enabled }}
        - path: {{ .Values.ingress.pathWs }}
          pathType: {{ .Values.ingress.pathTypeWs }}
          backend:
            service:
              name: {{ include "vaultwarden.fullname" . }}
              port:
                name: "websocket"
        {{- end }}

But according to the official documentation:

To enable WebSockets notifications, an external reverse proxy is necessary, and it must be configured to do the following:
Route the /notifications/hub endpoint to the WebSocket server, by default at port 3012, making sure to pass the Connection and Upgrade headers. (Note the port can be changed with WEBSOCKET_PORT variable)
Route everything else, including /notifications/hub/negotiate, to the standard Rocket server, by default at port 80.

So, if i understand correctly, only /notifications/hub should reach to WS port. Thus, pathTypeWs should be Exact instead of ImplementationSpecific for nginx-ingress-controller, right?

@guerzon
Copy link
Owner

guerzon commented Jun 7, 2023

Thanks for the report @skysbsb.

@guerzon guerzon closed this as completed Jun 7, 2023
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

Successfully merging a pull request may close this issue.

2 participants