Commit Graph

67 Commits

Author SHA1 Message Date
renovate[bot]
f40fe10d59 fix(deps): update module github.com/docker/docker to v26 2024-05-30 12:10:00 -04:00
Alexis Couvreur
a5a6e06cf4 fix(kubernetes): discovered deployments will be properly registered
closes #299
2024-05-04 23:05:03 -04:00
Alexis Couvreur
df1b8d21a6 feat(http): add Content-Length header on dynamic strategy
The Content-Length header will help system work better with long payloads.

The ngx_wasm_module from kong is not able to read the whole request without this header.
2024-04-30 15:49:22 -04:00
Alexis Couvreur
9167e9c8c8 refactor(theme): themes are loaded at startup instead of every request 2024-04-30 14:07:53 -04:00
Alexis Couvreur
932d9c9c52 Merge branch 'main' into beta 2024-04-21 04:44:51 +00:00
Alexis Couvreur
0e6a13249c fix(providers): add docker_swarm as a provider
Currently the documentation states that `docker_swarm` is an acceptable value for the Docker Swarm provider.
However, the code actually uses `swarm`.

This changes adds `docker_swarm` as a supported provider alias for docker swarm.

Closes #279
2024-04-16 17:22:58 -04:00
Alexis Couvreur
60b270472d feat(kubernetes): add provider.kubernetes.delimiter config property
the delimiter configuration property for kubernetes allows you to change the default "_" delimiter.

By specifying "/" or "." as a delimiter you ensure that you won't collide with objects names that contains the default delimiter "_".

Fixes #207
2024-02-05 12:05:12 -05:00
Alexis Couvreur
1cbe5d6fbb fix(deps): update module github.com/docker/docker to v25 2024-02-05 05:17:13 +00:00
Massimeddu Cireddu
0a72b337c2 feat(kubernetes-provider): get groups from statefulsets 2024-02-05 04:50:30 +00:00
Alexander Vyssochin
f4e88ae322 fix(providers/kubernetes): Added QPS and Burst tweaks for client-side throttling 2023-10-10 13:30:23 -04:00
Alexis Couvreur
72ea3b3645 refactor(provider): pass context.Context down to all operations
This means that with more work, a canceled request would cancel to underlying request.
2023-09-15 01:03:41 +02:00
Alexis Couvreur
8b57b9cd05 fix: use paramter for dynamic strategy
The value was using a hardcoded 5s

Fixes #175
2023-09-11 13:43:03 -04:00
Alexis Couvreur
ea1030353e feat(deps): upgrade to go 1.21 2023-08-25 18:11:01 -04:00
Alexis Couvreur
fc1b133704 fix(kubernetes): use kind_namespace_name_replicas format for group scanning 2023-04-08 15:24:48 -04:00
Alexis Couvreur
795792058f feat: add filter by labels (#134)
You are now able to use labels on containers and services such as `--sablier.enable=true` and `--sablier.group=mygroup` to select groups.
2023-03-28 21:31:22 -04:00
Alexis Couvreur
dd07ed0db0 fix(config): set session_duration optional with default value from sessions.default-duration 2023-03-26 22:10:43 -04:00
Alexis Couvreur
b6d73a3587 tests: pass lock by reference instead of value
fixes vet like "app/providers/mocks/client_mock.go:314:9: Get passes lock by value: github.com/acouvreur/sablier/app/providers/mocks.DeploymentMock contains github.com/stretchr/testify/mock.Mock contains sync.Mutex"
2023-01-09 13:00:06 -05:00
Alexis Couvreur
fe954e4372 fix(kubernetes): add deletion event listener 2022-11-14 19:43:19 +00:00
Alexis Couvreur
a550f8a817 fix(swarm): listen for removed services 2022-11-14 19:35:59 +00:00
Alexis Couvreur
93e4fbb901 test(swarm): fix typo SeviceScaledEvent to ServiceScaledEvent 2022-11-14 19:35:59 +00:00
Alexis Couvreur
2e0dc8320d feat: add healthcheck capabilities 2022-11-14 18:46:38 +00:00
Alexis Couvreur
80f2304375 fix(storage): initialize file to an empty JSON
It will avoir error message like `time="2022-11-14T01:40:49Z" level=error msg="error loading sessionsEOF"`
2022-11-14 15:15:39 +00:00
Alexis Couvreur
fc9e1fa8d2 fix(storage): close file after initialization 2022-11-14 14:57:06 +00:00
Alexis Couvreur
406a93b10e fix: typo NotifyInsanceStopped to NotifyInstanceStopped 2022-11-14 03:57:31 +00:00
Alexis Couvreur
1d34a812fd fix: set routes logging to Debug 2022-11-14 01:47:07 +00:00
Alexis Couvreur
b7e17dc77c fix(provider): use Actor.Attributes["name"] instead of deprecated From 2022-11-12 17:34:54 -05:00
Alexis Couvreur
cca050be08 fix(sessions): request blocking session is stopped upon user cancellation 2022-11-11 17:00:35 -05:00
Alexis Couvreur
d5da881604 feat: add kubernetes event listener
If a deployment or a statefulset is scaled to 0, then it is removed from the store.

In order for this to work, you need the `list` and `watch` verbs in your ClusterRole
2022-11-11 17:00:35 -05:00
Alexis Couvreur
006fb6679b refactor(events): close the channel from the sender 2022-11-11 17:00:35 -05:00
Alexis Couvreur
546b378416 feat(strategy): add option to show instances details
Closes #77
2022-11-10 11:31:46 -05:00
Alexis Couvreur
79d1f86ddf fix(swarm): remove suffix match on name
This could bring too much complexity. If a new service was created with exact match, it would take pecedence over the previously suffix matched service.

Closes #85
2022-11-08 15:57:38 -05:00
Alexis Couvreur
a62f098d42 feat: add swarm event listener 2022-11-07 17:12:13 -05:00
Alexis Couvreur
ec77d127ba test: fix typo existant to existent
Closes #82
2022-11-07 16:54:48 -05:00
Alexis Couvreur
1ca1934b1c feat(docker): listens for container stopped event
When a container is shutdown manually while it's registered as `ready` in Sablier it will remove it from the store.
Meaning externally events are now handled for docker.
2022-11-06 00:24:10 -04:00
Alexis Couvreur
8096a4e87e feat: add DesiredReplicas inside State struct
For now only the `Kubernetes` provider benefits from this improvement as `Docker` and `Swarm` have hardcoded 1 value
2022-11-03 20:55:09 -04:00
Alexis Couvreur
8a85a32561 feat: update JSON object returned by blocking strategy
Closes #68
2022-11-03 16:37:41 -04:00
Alexis Couvreur
411c2b2dc6 fix(tinykv): remove expired values from UnmarshalJSON 2022-11-02 23:15:06 -04:00
Alexis Couvreur
62e9d33ec8 feat(http): add graceful shutdown 2022-11-02 23:15:06 -04:00
Alexis Couvreur
154bb5e7ed feat: pretty json 2022-11-02 23:15:06 -04:00
Alexis Couvreur
29b81f9de3 fix(storage): add O_TRUNC flag to Writer
Overriding the file in order to remove garbage if writing less than the previous content
2022-11-02 23:15:06 -04:00
Alexis Couvreur
efc41311e4 fix(sessions): add MarshalJSON for SessionState 2022-11-02 23:15:06 -04:00
Alexis Couvreur
f842b491c6 test(render): add refresh frequency test 2022-11-02 23:15:06 -04:00
Alexis Couvreur
cf9f2f8ae3 feat(strategy): add dynamic theme listing endpoint /strategies/dynamic/themes 2022-11-02 23:15:06 -04:00
Alexis Couvreur
c47137edc7 feat(themes): add custom themes with security feature 2022-11-02 23:15:06 -04:00
Alexis Couvreur
e72a307163 fix(render): allow to load default themes when specifying custom themes 2022-11-02 23:15:06 -04:00
Alexis Couvreur
cc01caa5d4 feat(config): add strategy config 2022-11-02 23:15:06 -04:00
Alexis Couvreur
6cebeef97d fix(render): set refresh frequency to seconds
merge this with a6410f8613
2022-11-02 23:15:06 -04:00
Alexis Couvreur
6eb0789b7b feat(strategies): add blocking strategy 2022-11-02 23:15:06 -04:00
Alexis Couvreur
df2a67a290 feat: default theme for dynamic strategy is hacker-terminal 2022-11-02 23:15:06 -04:00
Alexis Couvreur
3196b1aa63 fix(render): set refresh frequency to seconds 2022-11-02 23:15:06 -04:00