sablierapp / sablier

Start your containers on demand, shut them down automatically when there's no activity. Docker, Docker Swarm Mode and Kubernetes compatible.
https://sablierapp.dev/
GNU Affero General Public License v3.0
1.36k stars 46 forks source link

fix kubernetes with traefik #241

Closed tomaszduda23 closed 9 months ago

tomaszduda23 commented 10 months ago

Address https://github.com/acouvreur/sablier/issues/142, https://github.com/acouvreur/sablier/issues/143, https://github.com/acouvreur/sablier/issues/131 and https://github.com/acouvreur/sablier/issues/62

acouvreur commented 10 months ago

Hi @tomaszduda23 thank you for your contribution, I'll look into the details soon!

acouvreur commented 9 months ago

After a quick reading, here's what I understand of your changes:

  1. Sablier states that the backend is ready
  2. You issue a request yourself to see if the underlying backend is in fact ready (sync between observed state and actual state)
  3. If it's not ready
    1. If it's in the case of a blocking request you issue a redirect
    2. If it's in the case of a dynamic request you serve the response from sablie

Makes sense to me! However I'll need your input and description on what you've done so we're sure everything is correct.

Also, check the builds failure, some tests appears to be broken. You might want to add test to cover all use cases you added.

Thanks for your contribution!

acouvreur commented 9 months ago

And it seems like the integration test for e2e worked! image

Good job!

tomaszduda23 commented 9 months ago
  • Sablier states that the backend is ready

  • You issue a request yourself to see if the underlying backend is in fact ready (sync between observed state and actual state)

  • If it's not ready

    1. If it's in the case of a blocking request you issue a redirect
    2. If it's in the case of a dynamic request you serve the response from sablie

The request is issued to check if 503 was generated inside traefik due to missing server or by server itself. Traefik is not able to attach server to existing router. When scaling from 0 to 1 client has to make one extra request. Otherwise there will be 503.

tomaszduda23 commented 9 months ago

Tests are fixed. The rest of fails in pipeline seems to be related to permissions.

acouvreur commented 9 months ago

I would like to merge this into beta, can you try and rebase your branch into beta first ?

tomaszduda23 commented 9 months ago

done

acouvreur commented 9 months ago

:tada: This PR is included in version 1.4.1-beta.9 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

acouvreur commented 8 months ago

:tada: This PR is included in version 1.6.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: