Commit Graph

11 Commits

Author SHA1 Message Date
Jirka Kremser 9047390737
migrate from v1.Endpoints to discoveryv1.EndpointSlices (#1298)
* Migration to EndpointSlices

Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>

* finish migration from v1.Endpoints to discoveryv1.EndpointSlices

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* handle multiple EndpointSlices per service

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

* remove deletecollection rbac for endpoint slices

Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>

---------

Signed-off-by: Jirka Kremser <jiri.kremser@gmail.com>
Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>
Co-authored-by: Jan Wozniak <wozniak.jan@gmail.com>
2025-09-18 14:42:54 +02:00
Jorge Turrado Ferrero a4f9f39ac5
feat: Support aggregation options (#961)
* feat: Support aggregation options

Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>

* Updates

Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>

* Updates

Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>

* fix changelog

Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>

* style & codegen

Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>

* add mocks

Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>

* update docs

Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>

* fix e2e test

Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>

* merge issues

Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>

* update manifests

Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>

---------

Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
2024-04-10 21:41:18 +00:00
Jorge Turrado Ferrero 1aea9bf659
fix: Improve Scaler reliability adding probes and 3 replicas (#872)
* fix: Improve Scaler reliability adding probes and 2 replicas

Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>

* fix unit test

Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>

* fix linting errores

Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>

* fix race condition on e2e test

Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>

* Update config/scaler/deployment.yaml

Signed-off-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>

---------

Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
Signed-off-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
2024-01-20 21:29:49 +00:00
Jorge Turrado Ferrero 214431250a
feat: Add support for any resource which implementes `/scale` subresource (#852) 2023-12-13 16:33:28 +01:00
Pedro Tôrres fb17e777c9
HTTPSO-based Routing Table (#669) 2023-06-15 00:33:59 +02:00
Jorge Turrado Ferrero b5c41c8c2a
chore: add golangci-lint (#584) 2023-01-27 08:52:15 +01:00
Aaron Schlesinger 2d35d0debf
fixing concurrent map access issue (#415)
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
Co-authored-by: Aaron Wislang <asw101@users.noreply.github.com>
2022-03-22 14:58:37 -04:00
Aaron Schlesinger 6526950f24
calling fetchAndSaveCounts in the scaler after any interceptor deployment events (#386)
* adding deployment cache to the scaler

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* more progress

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* fixing test

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2022-02-17 15:41:52 -08:00
Aaron Schlesinger 3df5d09282
Refactoring concurrency in scaler's pending HTTP queue fetcher logic (#291)
* refactoring concurrency in scaler's queue pinger

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* refactoring concurrency in scaler's queue pinger

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* implementing test for queue.Counts.Aggregate()

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* adding test for fetchAndSaveCounts

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* moving background processing out of the newQueuePinger constructor

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* updating queue pinger test

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* adding documentation to the queue pinger

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* removing errant ticker.Stop() call

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* removing errant newlines

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* removing manual interceptor fakes in favor of startFakeQueueEndpointServer

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-10-25 12:26:58 -07:00
Aaron Schlesinger 79c375d6d3
fixing typo in go comment (#288)
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-10-07 13:50:45 -07:00
Aaron Schlesinger c211da9bd1
Multi-tenant interceptor and scaler (#206)
* multi-tenant interceptor and scaler

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* specifying host in XKCD ingress

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* routing the xkcd chart to the interceptor properly

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* check host header first

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* sending true active response in stream

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* passing target pending requests through to the underlying ScaledObject (so the scaler can read it later)

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* removing broken target pending requests

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* using getHost in proxy handler

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* adding integration test

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* adding more tests to the integration test

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* splitting up integration tests

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* more checks

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* mark new test TODO

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* expanding interceptor integration tests

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* error messages

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* refactor test

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* more test improvements

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* rolling back target pending requests in ScaledObject

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* removing target metric error. it's not used anymore

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* improving waitFunc test

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* Refactoring the deployment cache to add better error handing and resilience.

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* adding doc comment

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* refactoring deploy cache and adding tests

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* Using interfaces for deployment watch & list

this makes tests easier

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* adding more deploy cache tests

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* Fixing up TestK8sDeploymentCacheRewatch

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* shutting down everything else when one thing errors, and adding a deployments cache endpoint

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* removing commented code

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* clarifying deployment cache JSON output, and simplifying deployment watch function

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* adding TODO tests

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* error logs and restoring the count middleware

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* using consistent net/http package name throughout main.go

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* Refactoring deployment cache deployment storage

Also, running go mod tidy and adding new TODO (i.e. failing) tests

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* using deployment.Status.ReadyReplicas, instead of just replicas

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* integration_tets ==> proxy_handlers_integration_test

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* adding some resilience to tests

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* adding deployment cache endpoint documentation

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* running the global test target with sh.RunV

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* adding timeout to magefile test target

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

* finishing one TODO test and adding issue for the rest:

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-09-03 10:19:20 +02:00