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

DevWorkspaceRouting reconciler breaks endpoints when they specify a path #1031

Closed
amisevsk opened this issue Feb 1, 2023 · 1 comment · Fixed by #1032
Closed

DevWorkspaceRouting reconciler breaks endpoints when they specify a path #1031

amisevsk opened this issue Feb 1, 2023 · 1 comment · Fixed by #1032
Assignees
Milestone

Comments

@amisevsk
Copy link
Collaborator

amisevsk commented Feb 1, 2023

Description

The DevWorkspaceRouting reconciler does not correctly handle endpoints that specify a path, resulting in a mismatch between the route/ingress created and the endpoint reported the DevWorkspace reconciler. This can result in workspaces failing to start, if an affected endpoint is marked as the 'main' one.

How To Reproduce

Apply the following workspace:

kind: DevWorkspace
apiVersion: workspace.devfile.io/v1alpha2
metadata:
  name: plain-devworkspace
spec:
  started: true
  routingClass: 'basic'
  template:
    components:
      - name: web-terminal
        container:
          image: quay.io/wto/web-terminal-tooling:next
          memoryLimit: 512Mi
          mountSources: true
          command:
            - "tail"
            - "-f"
            - "/dev/null"
          endpoints:
            - name: test-path
              targetPort: 8890
              exposure: public
              path: /test/path/
              protocol: http
            - name: test-no-path
              targetPort: 8890
              exposure: public
              protocol: http

This creates routes, e.g.:

NAME                                        HOST/PORT                                     PATH                SERVICES                            PORT    TERMINATION     WILDCARD
workspace7d8fbdb0fae242e7-test-no-path      workspace7d8fbdb0fae242e7.<cluster-url>.com   /test-no-path/      workspace7d8fbdb0fae242e7-service   8890    edge/Redirect   None
workspace7d8fbdb0fae242e7-test-path         workspace7d8fbdb0fae242e7.<cluster-url>.com   /test-path/         workspace7d8fbdb0fae242e7-service   8890    edge/Redirect   None

however the DevWorkspaceRouting gets a status like

  exposedEndpoints:
    web-terminal:
    - name: test-path
      # Should be http://workspace7d8fbdb0fae242e7.<cluster-url>.com/test-path/test/path/
      url: http://workspace7d8fbdb0fae242e7.<cluster-url>.com/test/path/
    - name: test-no-path
      url: http://workspace7d8fbdb0fae242e7.<cluster-url>.com/test-no-path/

Additional context

@amisevsk amisevsk self-assigned this Feb 1, 2023
This was referenced Feb 1, 2023
@amisevsk
Copy link
Collaborator Author

amisevsk commented Feb 1, 2023

This issue only appears to impact DWO on OpenShift; on Kubernetes, we default to using / as the path for ingresses rather than the endpoint name.

@amisevsk amisevsk added this to the v0.19.x milestone Feb 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.

1 participant