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

Enable apiserver access #3509

Merged
merged 3 commits into from Feb 24, 2022
Merged

Enable apiserver access #3509

merged 3 commits into from Feb 24, 2022

Conversation

pbiggar
Copy link
Member

@pbiggar pbiggar commented Feb 24, 2022

Part of #3508

This allows users to test out the new backend in the editor by going to

https://darklang/a/canvasname?fsharp-backend=true

At also allows them to test loading the editor by going to

https://darklang.com/a-testing-fsharp/canvasname

Or to get both:

https://darklang.com/a-testing-fsharp/canvasname?fsharp-backend=true

@pbiggar
Copy link
Member Author

pbiggar commented Feb 24, 2022

predeployment checks are expected to fail as I haven't deployed the ingress configuration yet.

Copy link
Member

@StachuDotNet StachuDotNet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite know what's happening in nginx.conf or the ingress.yaml file, but rest all seems appropriate.

@pbiggar
Copy link
Member Author

pbiggar commented Feb 24, 2022

fyi

I don't quite know what's happening in nginx.conf or the ingress.yaml file, but rest all seems appropriate.

-  location ~ (/a/|/api/|/login|/logout|/check-apiserver) {
+  location ~ (/a/|/a-testing-fsharp/|/api/|/api-testing-fsharp/|/login|/logout|/check-apiserver) {

This matches (using regex) the paths /a/, /api/, etc, and passes them on to the apiserver on port 9001. So the change says to also pass on the paths /a-testing-fsharp/ and /api-testing-fsharp.

  rules:
    # See
    # https://cloud.google.com/kubernetes-engine/docs/how-to/load-balance-ingress#creating_an_ingress
    # These rules are intended to enable one user onto the new F# backend, while we
    # see what works.
    - http:
        paths:
-         # No slash at the end
-         - path: /a/trydarkfsharp
+         # Testing so that any user can use these
+         - path: /a-testing-fsharp/*
            pathType: ImplementationSpecific
            backend:
              service:
                name: apiserver-service
                port:
                  number: 80

This rule tells the load balancer to send traffic matching these paths to the apiserver-service (if it doesn't match, it goes to the defaultBackend, which is the darklang-nodeport (which should be called editor-service).

@StachuDotNet
Copy link
Member

Thank you for that context!

@pbiggar pbiggar merged commit b3b15e2 into main Feb 24, 2022
@pbiggar pbiggar deleted the paul/enable-apiserver-access branch February 24, 2022 20:50
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 this pull request may close these issues.

None yet

2 participants