Commit Graph

141 Commits

Author SHA1 Message Date
laminar 201c7cb7bf
Add configMap informer (#326)
Signed-off-by: laminar <fangtian@kubesphere.io>
Signed-off-by: laminar <fangtian@kubesphere.io>

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-12-14 10:06:27 -08:00
dependabot[bot] 8622cf5dee
Bump google.golang.org/grpc from 1.41.0 to 1.42.0 (#312)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.41.0 to 1.42.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.41.0...v1.42.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-11-19 13:56:23 -08:00
dependabot[bot] c0e5852e15
Bump k8s.io/client-go from 0.22.2 to 0.22.4 (#329)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.22.2 to 0.22.4.
- [Release notes](https://github.com/kubernetes/client-go/releases)
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.22.2...v0.22.4)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-19 13:52:49 -08:00
dependabot[bot] b9f0a49fab
Bump k8s.io/apimachinery from 0.22.3 to 0.22.4 (#328)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.22.3 to 0.22.4.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.22.3...v0.22.4)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-19 21:31:57 +00:00
Aaron Schlesinger ba4dc4137f
Updating the release process document with correct order of operations (#327)
* updating the release process document

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

* adding information about the chart's images.tag field in values.yaml

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-11-19 21:27:19 +00:00
dependabot[bot] 2893a0974d
Bump sigs.k8s.io/controller-runtime from 0.10.1 to 0.10.3 (#317)
Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.10.1 to 0.10.3.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.10.1...v0.10.3)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-11-18 15:17:10 -08:00
dependabot[bot] 79ff716f73
Bump k8s.io/api from 0.22.2 to 0.22.3 (#307)
Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.22.2 to 0.22.3.
- [Release notes](https://github.com/kubernetes/api/releases)
- [Commits](https://github.com/kubernetes/api/compare/v0.22.2...v0.22.3)

---
updated-dependencies:
- dependency-name: k8s.io/api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-11-18 15:10:41 -08:00
Aaron Schlesinger b7fc02b74d
Adding release instructions for artifact hub (#318)
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
2021-11-16 08:19:51 +00:00
Aaron Schlesinger dda17c5eae
running go mod tidy (#320) 2021-11-12 14:28:12 +01:00
Ritika b9f112c305
Correcting install guide for keda (#319)
Signed-off-by: Ritikaa96 <ritika@india.nec.com>
2021-11-11 18:46:14 +00:00
Aaron Schlesinger 6928ad16b6
Fixing operator startup (#315)
* fixing operator startup code

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

* updating go vsn

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-11-10 10:39:15 -08:00
Aaron Schlesinger 5e745724e3
fixing release of interceptor and scaler (#314)
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-11-10 07:20:23 +00:00
dependabot[bot] 7ae61863d3
Bump github.com/onsi/gomega from 1.16.0 to 1.17.0 (#311)
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.16.0...v1.17.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-09 15:36:21 -08:00
Aaron Schlesinger d2a130603a
fixing links to ghcr (#301)
Signed-off-by: Aaron <aaron@ecomaz.net>
2021-11-09 22:50:33 +00:00
Ajanth ff6088fbee
Fixing issue 271 (#300)
* Fixing issue 271

Signed-off-by: Ajanth <ajanth1997@gmail.com>

* chore: Provide configuration for automatically closing inactive issues (#298)

* chore: Provide configuration for automatically closing inactive issues

Signed-off-by: GitHub <noreply@github.com>

* Align with core

Signed-off-by: GitHub <noreply@github.com>

* feature instead of feature-request

Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: Ajanth <ajanth1997@gmail.com>

* Update operator/controllers/routing_table.go

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
Signed-off-by: Ajanth <ajanth1997@gmail.com>

* Update operator/main.go

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
Signed-off-by: Ajanth <ajanth1997@gmail.com>

* Update operator/main.go

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
Signed-off-by: Ajanth <ajanth1997@gmail.com>

* Update operator/main.go

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
Signed-off-by: Ajanth <ajanth1997@gmail.com>

* Update operator/controllers/routing_table.go

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
Signed-off-by: Ajanth <ajanth1997@gmail.com>

* Fixing test and an indentation

Signed-off-by: Ajanth <ajanth1997@gmail.com>

Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-11-05 09:12:28 -07:00
Aaron Schlesinger 25b76b590a
adding proper nginx-ingress annotation to the xkcd chart's ingress resourcs (#309)
Signed-off-by: Aaron <aaron@ecomaz.net>
2021-11-03 13:15:13 -07:00
Aaron Schlesinger a0407daf9b
Update install.md (#304)
Signed-off-by: Aaron <aaron@ecomaz.net>
2021-10-29 16:24:27 -07:00
dependabot[bot] 4d9cae6592
Bump github.com/onsi/ginkgo from 1.16.4 to 1.16.5 (#299)
Bumps [github.com/onsi/ginkgo](https://github.com/onsi/ginkgo) from 1.16.4 to 1.16.5.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/ginkgo/compare/v1.16.4...v1.16.5)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-10-26 11:29:03 -07:00
Zbynek Roubalik 57de7e046c
spelling fix: KNative -> Knative (#303)
* faq spelling fix: KNative -> Knative

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* fix comment

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-10-26 08:29:32 -07:00
Aaron Schlesinger 93bf69958e
adding test for interceptor headers and redirection (#258)
Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-10-25 12:43:07 -07:00
Aaron Schlesinger 8ebbabc763
swapping watch broadcaster channel behavior (#283)
* swapping watch broadcaster channel behavior

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

* small test refactor

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

* more comments in test

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

* more comments and interface implementation check for fake deployment cache

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

* adding comment to closeableWatcher

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

* forgot the beginning of comment

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

* adding error checking to the closeableWatcher

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

* removing resultCalls from the closeable watcher

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

* removing the closeableWatcher in favor of the fake watcher functionality in client-go

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

* closeableWatcher => reopeningWatcher

The core functionality needed was automatic reopening of watch channels. This commit
implements that while removing some ancillary things like specifying whether
to reopen etc...

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

* fixing nil ptr exception

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

* clarifying comments

Signed-off-by: Aaron <aaron@ecomaz.net>
2021-10-25 12:38:47 -07:00
Aaron Schlesinger 41e86c124a
Follow-up tests for multi-tenant work (#279)
* add test for addEvt in deployment cache

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

* Adding TestRunProxyServerCountMiddleware

Currently failing :)

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

* adding resize timeout to the queue fake

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

* StartTestServer => NewTestServer

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

* StartTestServer => NewTestServer

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

* Going back to StartTestServer

I forgot that it actually does start the test server in the background

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

* using targetFromURL

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

* more StartTestServer

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

* Keeping track of the running queue count in the fake

Also protecting that map with a mutex

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

* finishing the interceptor test

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

* adding test comment

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

* more movement over to targetFromURL

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

* additional checks

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-10-25 12:33:02 -07: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 30fb204671
using ServeContext for all production HTTP servers (#292)
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-10-25 12:10:02 -07:00
Aaron Schlesinger 119e0ea495
Adding a fake controller-runtime Client implementation and improving operator tests (#247)
* 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>

* implementing a fake controller-runtime client

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

* testing properly

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-10-25 12:05:32 -07:00
Aaron Schlesinger 5687d40217
Adding test for 'interceptor' as host in GetScalerMetrics (#294)
* adding test for 'interceptor' as host in GetScalerMetrics

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

* running table-driven tests in parallel

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-10-25 11:50:33 -07:00
Aaron Schlesinger 53b14e2d6c
Checking for deployment equality in deployment cache (#275)
* checking deployment equality

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

* adding test for MODIFIED events

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

* adding mergeAndBroadcastList test for MODIFIED events

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

* getting final test working

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

* removing useless code

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-10-25 11:44:35 -07:00
Aaron Schlesinger a3aeb62a4d
Adding config endpoints on admin servers for scaler, interceptor and operator (#280)
* adding config endpoint to interceptor

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

* adding documentation about configuration  endpointss

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

* adding operator and scaler config endpoints

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

* testing scaler and operator

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

* serving operator and scaler admin servers on random ports for tests

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

* implementing json.Marshaler for FakeDeploymentCache

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

* implementing TestRunAdminServerDeploymentsEndpoint

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-10-25 11:38:53 -07:00
Aaron Schlesinger ffa8042631
Consolidating the scaler GetMetricSpec tests into one table-driven test (#295)
* Consolidating the scaler GetMetricSpec tests into one table-driven tests

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

* generalizing duplicated code

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-10-25 11:32:43 -07:00
Tom Kerkhove b0f25ce442
chore: Provide configuration for automatically closing inactive issues (#298)
* chore: Provide configuration for automatically closing inactive issues

Signed-off-by: GitHub <noreply@github.com>

* Align with core

Signed-off-by: GitHub <noreply@github.com>

* feature instead of feature-request

Signed-off-by: GitHub <noreply@github.com>
2021-10-14 17:30:59 +00:00
Ajanth c13c1d3aac
Handling host value of "interceptor" in GetMetricSpec (#273)
* Fixing issue #272

Signed-off-by: Ajanth <ajanth1997@gmail.com>

* Fixing scaler test

Signed-off-by: Ajanth <ajanth1997@gmail.com>

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-10-08 08:54:07 -07:00
Aaron Schlesinger 4c61fae33f
removing double sleep in scaler handler test (#290)
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-10-08 05:15:28 +00:00
Aaron Schlesinger b5058f8544
removing ingress option on xkcd chart (#289)
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-10-08 07:12:34 +02: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 40a5c41384
adding devcontainer files (#232)
* adding devcontainer files

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

* bumping Go version to 1.17

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

Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
2021-10-04 18:25:48 +00:00
dependabot[bot] cdb8cad00e
Bump google.golang.org/grpc from 1.40.0 to 1.41.0 (#270)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.40.0 to 1.41.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.40.0...v1.41.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-01 10:55:09 -07:00
Aaron Schlesinger f8d7c0bbe4
Adding configurability to the interceptor's HTTP round tripper (#250)
* 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>

* Adding configurability to the interceptor's HTTP round tripper

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

* fixing compile errs in tests

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-09-22 12:07:00 +05:30
dependabot[bot] 295eb4006c
Bump sigs.k8s.io/controller-runtime from 0.10.0 to 0.10.1 (#268)
Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.10.0 to 0.10.1.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.10.0...v0.10.1)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-21 12:34:11 -07:00
Aaron Schlesinger e5749d65f0
adding contributing.md document (#267)
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-09-21 17:38:04 +00:00
Aaron Schlesinger 8ad85534e5
using external push scalers in the generated scaled objects (#255)
Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-09-21 17:15:15 +00:00
dependabot[bot] a60b3c9ff5
Bump google.golang.org/protobuf from 1.26.0 to 1.27.1 (#252)
Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.26.0 to 1.27.1.
- [Release notes](https://github.com/protocolbuffers/protobuf-go/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash)
- [Commits](https://github.com/protocolbuffers/protobuf-go/compare/v1.26.0...v1.27.1)

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-21 17:04:49 +00:00
dependabot[bot] fba90b4772
Bump google.golang.org/grpc from 1.38.0 to 1.40.0 (#264)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.38.0 to 1.40.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.38.0...v1.40.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-09-21 16:53:31 +00:00
dependabot[bot] 43070ae903
Bump k8s.io/client-go from 0.22.1 to 0.22.2 (#265)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.22.1 to 0.22.2.
- [Release notes](https://github.com/kubernetes/client-go/releases)
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.22.1...v0.22.2)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-09-21 16:50:27 +00:00
Aaron Schlesinger f6b865e2ee
removing old conflict from ref doc (#261)
Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-09-21 07:22:11 +02:00
dependabot[bot] 298115de06
Bump sigs.k8s.io/controller-runtime from 0.9.2 to 0.10.0 (#253)
Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.9.2 to 0.10.0.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.9.2...v0.10.0)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-09-20 19:08:37 +00:00
Aaron Schlesinger aa4e0a82b7
Specifying target in scaler for specific host (#242)
* 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>

* Specifying target size for specific host in scaler

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

* sending targetPendingRequests to scalers via the routing table

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

* using routing table reader interface in scaler

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-09-13 17:59:01 +00:00
dependabot[bot] 9f963f293a
Bump go.uber.org/zap from 1.19.0 to 1.19.1 (#260)
Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.19.0 to 1.19.1.
- [Release notes](https://github.com/uber-go/zap/releases)
- [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber-go/zap/compare/v1.19.0...v1.19.1)

---
updated-dependencies:
- dependency-name: go.uber.org/zap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-13 10:27:27 -07:00
Aaron Schlesinger 27612dabee
adding Ajanth as a code owner (#256)
Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>

Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
2021-09-08 19:27:26 +00:00
Aaron Schlesinger 78e5a73a04
Documenting the targetPendingRequests field (#233)
* documenting the targetPendingRequests field

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

* moving more technical documentation into the design doc

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

* spacing

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-09-08 19:21:32 +00:00
dependabot[bot] bf8ae064d4
Bump go.uber.org/zap from 1.17.0 to 1.19.0 (#251)
Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.17.0 to 1.19.0.
- [Release notes](https://github.com/uber-go/zap/releases)
- [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber-go/zap/compare/v1.17.0...v1.19.0)

---
updated-dependencies:
- dependency-name: go.uber.org/zap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-09-07 11:22:26 -07:00