* upgrading all dockerfile Go versions to 1.16
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* creating new targets for the example/test HTTPScaledObject
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* moving external scaler generated files
the scaler uses the server stubs but the operator now needs to use the client, so it needs to move out of the scaler binary
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* progress on code to wait for scaler
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* checking deployment replicas:
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* Adding health check endpoints to the scaler
Also centralizing config for the scaler with envconfig
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* Closing both the gRPC server and HTTP healthcheck server on context cancel/timeout
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* adding util functions for adding liveness/readiness probes
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* fixing var name
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* adding readiness and liveness probes, and tests for it
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* printing output for scaler tests, even when they fail
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* simplifying scaler health check code
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* adding health check test code to scaler
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* Make imagePullPolicy configurable
Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>
* Fix tests
Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>
* Pass on config from main
Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>
Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
* Refactoring the interceptor
- Adding more testing to the proxy
- Refactoring the proxy to use standard net/http (gives it more control over the response lifecycle)
- Using the standard library test framework, because stretchr/testify/suite was not adding much (stretchr/testify/require is still in use though)
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* adding test for holding the connection
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* removing dead code
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* removing dead code
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* using the getter/watcher logic in the proxy handler
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* progress on fast getter/watcher implementation:
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* adding deployment cache
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* adding a backoff for the network connection
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* adding test targets to the magefile
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* Fixing and adding more tests to the proxy
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* Adding test to ensure proxy handler holds until >0 replicas on target deployment
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* refactoring in progress and more tests
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* todo test
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* fixing hanging issue
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* adding test for slow origin, and a TODO in the proxy tests
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* TODO tests
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* more work on connection retry and backoff
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* logging nested errors
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* better test checks and explanatory comments
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* moving sumExp utility function to top
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* adding tests for DialContextWithRetry
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* refactoring backoff etc...
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* refactoring the dialer
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* refactoring if/else multiple return statements
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* removing addition from num steps
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* removing dead code and updating knative attribution comment
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* removing net error type check
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* adding one more test
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* implementing TODO tests and cleaning up unused and logging code
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* adding wait func timeout
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* adding waitFunc timeout logic
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* starting tests for the deployment cache
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* adding deployment cache watch test
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* adding timing checks to the deployment cache test
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* Fixing the last broken test
Turns out, don't run a handler in a goroutine because (net/http/httptest).ResponseRecorder
is not concurrency-safe. Thanks to @asw101 and @khaosdoctor for help on this!
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* Tidying up interceptor config and making operator set more config vars
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* fixing tests and compile errs
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* logging
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* Adding helm delete functionality to makefile
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* Splitting up functionality, logs and more
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* checking error fetching services
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* Using the proper service name
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* enabling RBAC on endpoints so the scaler can access interceptor queue sizes
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* logs and TODOs
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* using IPs instead of hostnames in external scaler
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* backing off polling interval
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* logging on external scaler startup
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* removing superfluous logging in scaler
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* port and updating namespaces
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* the right namespace
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* adding grpc reflection
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* Makefile targets for creating/deleting example HTTPScaledObject
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* Removing namespace from example HTTPScaledObject file
it is specified when you add it from the make target
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* adding keda creation logic to Makefile (and install doc)
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* helm delete keda target
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* Passing queue pinger around as a pointer
Otherwise the queue lengths are always reported as 0
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>