Commit Graph

247 Commits

Author SHA1 Message Date
Aaron Schlesinger e37b3b500d
adding a short intro section to the README (#140) 2021-04-15 15:03:20 +02:00
Aaron Schlesinger e513b2df37
adding required parameters to the xkcd chart values file (#131)
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-04-14 10:50:27 -07:00
Aaron Schlesinger 54928eaee7
Building images in PRs (#133)
* Building images in PRs

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

* upping Dockerfile Go versions

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-04-14 10:45:34 -07:00
Aaron Schlesinger 8c60d9d6c8
Switching `make` commands to `helm` commands. (#128)
* Switching `make` commands to `helm` commands.

Fixes https://github.com/kedacore/http-add-on/issues/117

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

* adding mage version minimum

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-04-14 10:41:36 -07:00
Aaron Schlesinger a98fe077c0
adding documentation examples in the PR template (#136)
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-04-14 10:30:35 -07:00
dependabot[bot] ffe69cb2a1
Bump k8s.io/api from 0.17.2 to 0.20.4 (#70)
Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.17.2 to 0.20.4.
- [Release notes](https://github.com/kubernetes/api/releases)
- [Commits](https://github.com/kubernetes/api/compare/v0.17.2...v0.20.4)

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>
Co-authored-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-04-12 13:25:09 -07:00
dependabot[bot] 92e34c3ca5
Bump sigs.k8s.io/controller-runtime from 0.8.1 to 0.8.3 (#91)
Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.8.1 to 0.8.3.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.8.1...v0.8.3)

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-04-12 13:18:58 -07:00
dependabot[bot] a4c9062727
Bump github.com/labstack/echo/v4 from 4.2.1 to 4.2.2 (#127)
Bumps [github.com/labstack/echo/v4](https://github.com/labstack/echo) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/labstack/echo/releases)
- [Changelog](https://github.com/labstack/echo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/labstack/echo/compare/v4.2.1...v4.2.2)

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-04-12 13:14:19 -07:00
dependabot[bot] da499a2d46
Bump github.com/golang/protobuf from 1.4.3 to 1.5.2 (#122)
* Bump github.com/golang/protobuf from 1.4.3 to 1.5.2

Bumps [github.com/golang/protobuf](https://github.com/golang/protobuf) from 1.4.3 to 1.5.2.
- [Release notes](https://github.com/golang/protobuf/releases)
- [Commits](https://github.com/golang/protobuf/compare/v1.4.3...v1.5.2)

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

* Bump github.com/golang/protobuf from 1.4.3 to 1.5.2

Bumps [github.com/golang/protobuf](https://github.com/golang/protobuf) from 1.4.3 to 1.5.2.
- [Release notes](https://github.com/golang/protobuf/releases)
- [Commits](https://github.com/golang/protobuf/compare/v1.4.3...v1.5.2)

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

* Bump github.com/golang/protobuf from 1.4.3 to 1.5.2

Bumps [github.com/golang/protobuf](https://github.com/golang/protobuf) from 1.4.3 to 1.5.2.
- [Release notes](https://github.com/golang/protobuf/releases)
- [Commits](https://github.com/golang/protobuf/compare/v1.4.3...v1.5.2)

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 <aaron@ecomaz.net>
2021-04-12 13:07:13 -07:00
dependabot[bot] 7704101d02
Bump github.com/go-logr/logr from 0.1.0 to 0.4.0 (#29)
Bumps [github.com/go-logr/logr](https://github.com/go-logr/logr) from 0.1.0 to 0.4.0.
- [Release notes](https://github.com/go-logr/logr/releases)
- [Commits](https://github.com/go-logr/logr/compare/v0.1.0...v0.4.0)

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-04-12 13:01:10 -07:00
dependabot[bot] f880544eea
Bump github.com/onsi/ginkgo from 1.15.2 to 1.16.1 (#126)
Bumps [github.com/onsi/ginkgo](https://github.com/onsi/ginkgo) from 1.15.2 to 1.16.1.
- [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.15.2...v1.16.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-12 12:54:32 -07:00
Aaron Schlesinger 6b8d4ab8aa
Refactoring the interceptor (#105)
* 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>
2021-04-12 12:48:07 -07:00
Aaron Schlesinger 728437a572
adding additional printer columns to HTTPScaledObjects (#121)
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-03-31 11:11:59 -07:00
Aaron Schlesinger 89a39bcf61
changing default image names in Makefile to GH container registry (#114)
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-03-29 15:44:01 -07:00
Lucas Santos d6a2265041
Use embedded scaledobject templates (#106)
* Tidy mod file

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Remove KEDA unstructured types

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Update tests to use go 1.16

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Add missing check and return errors

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Add error handling

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-03-24 14:59:28 -07:00
Aaron Schlesinger 2b395d1548
Scaling up the interceptor (#32)
* Scaling up the interceptor

Fixes https://github.com/kedacore/http-add-on/issues/30

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

* Specifying min and max replicas on ScaledObjects

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

* respecting the min and max replica count

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

* adding new enum types to kubebuilder definition

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

* re-generating CRD

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

* adding check for interceptor scaled object to tests

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

* generalizing unstructured parsing code in test

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-03-22 12:06:35 -07:00
Aaron Schlesinger fd4cdfe718
Not creating app deployments (#78)
* Allowing users to scale an existing deployment

Fixes https://github.com/kedacore/http-add-on/issues/35

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

* checking custom deployment info

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

* Adding tests for new deployment logic

Also generalizing test "infrastructure" code

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

* regenerating code

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

* Remove functionality to auto-create deployments and services

Users provide a scale target ref, which is the name of the
deployment to scale and the service to route to. They are required
to have already deployed these things already

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

* Adding more docs

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

* regenerating with 0.5.0 controller-gen

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

* fixing compile err

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-03-19 12:58:29 -07:00
Aaron Schlesinger a0260907a1
adding @khaosdoctor to codeowners (#76)
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

Co-authored-by: Zbynek Roubalik <726523+zroubalik@users.noreply.github.com>
2021-03-19 09:26:38 +01:00
Aaron Schlesinger 55f258a289
Adding a use cases document (#83)
* Adding a use cases document.

Fixes https://github.com/kedacore/http-add-on/issues/81

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

* alphabetically sorting list of providers

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

* adding steps to move to KEDA-HTTP for use case 1

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

* steps for migrating for use case 2

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

* adding color coding

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

* Update docs/use_cases.md

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

Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
2021-03-17 09:45:03 -07:00
dependabot[bot] d20f4b3083
Bump github.com/onsi/ginkgo from 1.14.1 to 1.15.2 (#102)
Bumps [github.com/onsi/ginkgo](https://github.com/onsi/ginkgo) from 1.14.1 to 1.15.2.
- [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.14.1...v1.15.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-16 12:22:00 -07:00
dependabot[bot] ff3caf92d6
Bump github.com/onsi/gomega from 1.10.2 to 1.11.0 (#86)
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.10.2 to 1.11.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.10.2...v1.11.0)

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-03-16 12:10:35 -07:00
dependabot[bot] b42cc84279
Bump github.com/labstack/echo/v4 from 4.1.17 to 4.2.1 (#87)
Bumps [github.com/labstack/echo/v4](https://github.com/labstack/echo) from 4.1.17 to 4.2.1.
- [Release notes](https://github.com/labstack/echo/releases)
- [Changelog](https://github.com/labstack/echo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/labstack/echo/compare/v4.1.17...v4.2.1)

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-03-16 12:06:33 -07:00
dependabot[bot] fab034abca
Bump github.com/stretchr/testify from 1.6.1 to 1.7.0 (#77)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.6.1...v1.7.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-16 12:01:55 -07:00
Aaron Schlesinger 417a6438da
Adding automated link checking to documentation (#100) 2021-03-16 07:17:14 +01:00
Lucas Santos 269d17c410
Add min and max replicas (#85)
* Add min and max replicas

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Go fmt

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Update example

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Fix wrong value key

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Using internal struct for replicas

Signed-off-by: Lucas Santos <hello@lsantos.dev>

* Update manifests

Signed-off-by: Lucas Santos <hello@lsantos.dev>

* Fix wrong naming

Signed-off-by: Lucas Santos <hello@lsantos.dev>

* Create tests

Signed-off-by: Lucas Santos <hello@lsantos.dev>

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-03-15 16:26:36 -07:00
Aaron Schlesinger 8f20c3aade
Updating arch diagram according to new scope (#93)
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-03-15 16:23:02 -07:00
Aaron Schlesinger 4b1d8b057f
Adding documentation on the scope of functionality (#82)
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
2021-03-10 07:10:26 +01:00
Lucas Santos 13ccee2168
workflow-fix (#92)
* Update SHA on workflows

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Update to old git way

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Try to fix workflow without bash

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>
2021-03-09 11:30:20 -08:00
Lucas Santos a19b0c7c85
workflow-fix (#90)
* Update SHA on workflows

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Update to old git way

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>
2021-03-09 10:06:17 -08:00
Lucas Santos 897499ed89
Magefiles (#89)
* Add contributing docs

Signed-off-by: Lucas Santos <hello@lsantos.dev>

* Add README

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Add magefiles

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>
2021-03-08 14:58:14 -08:00
Lucas Santos c99982f64f
Update workflows to V2 (#55)
* Update release workflow

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Update canary workflow

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Update .github/workflows/build_canary.yml

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

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

* Update .github/workflows/build_canary.yml

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

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

* Update .github/workflows/build_release.yml

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

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

* Update .github/workflows/build_canary.yml

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

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

* Update .github/workflows/build_release.yml

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

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

* Update .github/workflows/build_release.yml

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

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

* Remove output variables

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-03-08 10:20:13 -08:00
Lucas Santos 183b3d61da
Update outdated APIs (#84)
Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>
2021-03-05 13:13:48 -08:00
Aaron Schlesinger e0ca238fb2
Beginning to write tests (#43)
* Beginning to write tests

Ref https://github.com/kedacore/http-add-on/issues/13

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

* Improve status conditions

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* removing old httpscaledobject CRD

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

* starting on the user test

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

* refactoring typed Kubernetes clients out

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

* finishing delete logic

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

* removing now-unused code

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

* removing commented unused code

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

* fixing lint error

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

* first test for createUserApp

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

* more checks

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

* finishing tests for the service

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

* starting with scaled object tests

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

* adding GH action for running tests

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

* going back to old versions of things

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

* running tests on all pushes to main and PRs

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

* go mod tidy and a new Makefile target

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

* a few fixes

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

* fixing compile errs

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

* more testing

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

* fixing tests

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

* adding initial tests for the external scaler

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

* starting interceptor tests

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

* more interceptor testing

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

* starting on proxy handler test

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

* more tests for the interceptor, including middleware

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

* fixing scaler compile errs

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

* commenting cluster connection code

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

* removing unneeded NameNamespaceInfo

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

* fixing zap logging compile err

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

Co-authored-by: Lucas Santos <lhs.santoss@gmail.com>
2021-02-27 13:29:11 +01:00
Lucas Santos ebef98e514
Improve status conditions (#47)
* Improve status conditions

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* refactoring typed Kubernetes clients out

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

* finishing delete logic

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

* removing now-unused code

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

* removing commented unused code

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

* fixing lint error

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

* Delete test file

PR #43 will address it

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Update deployment client

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Update scaled object client

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Add fix notation

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Move FIX to TODO

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Add context to requestCounts

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Adding an FAQ (#71)

Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
Sign-off-executed-by: Lucas Santos <lhs.santoss@gmail.com>
Approved-at: Aaron Schlesinger <aaron@ecomaz.net>

* Remove unused code

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Use two strings as opposed to interface

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Revert "Delete test file"

This reverts commit 46f4de7c0bf59ea9aa8d9a345762ccb8b652ea33.

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>
Sign-off-executed-by: Lucas Santos <lhs.santoss@gmail.com>
Approved-at: Aaron Schlesinger <aaron@ecomaz.net>

* Restore pkg/k8s/client.go

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>
Sign-off-executed-by: Lucas Santos <lhs.santoss@gmail.com>
Approved-at: Aaron Schlesinger <aaron@ecomaz.net>

* Add context to queue pinger

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Adding an FAQ (#71)

Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>

Signed-off-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
Sign-off-executed-by: Lucas Santos <lhs.santoss@gmail.com>
Approved-at: Aaron Schlesinger <aaron@ecomaz.net>

* Revert "Delete test file"

This reverts commit 46f4de7c0bf59ea9aa8d9a345762ccb8b652ea33.

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>
Sign-off-executed-by: Lucas Santos <lhs.santoss@gmail.com>
Approved-at: Aaron Schlesinger <aaron@ecomaz.net>

* Restore pkg/k8s/client.go

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>
Sign-off-executed-by: Lucas Santos <lhs.santoss@gmail.com>
Approved-at: Aaron Schlesinger <aaron@ecomaz.net>

* Add context to queue pinger

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

Co-authored-by: Aaron Schlesinger <aaron@ecomaz.net>
Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-02-26 10:57:59 -08:00
Aaron Schlesinger ee0974ac37
Adding an FAQ (#71)
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
2021-02-25 07:19:55 +01:00
Lucas Santos eaa2be89e6
Change images to scratch (#41)
* Change interceptor image to scratch

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Update scaler to scratch image

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>
2021-02-11 11:17:11 -08:00
Aaron Schlesinger 4141b75b5a
Using latest tag for image names in helm chart (#52)
* using latest tag for image names

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

* adding latest tag

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

* moving to hierarchical image configs

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-02-09 09:02:11 -08:00
Aaron Schlesinger 074651425c
Only pushing canary/sha images on pushes to main (not PRs) (#53)
* using proper repo name in GH action

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

* Using proper name in image repository on release builds

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

* removing PR pushes to GHCR

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

* going back to using secret for GHCR org name

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-02-09 08:56:32 -08:00
Lucas Santos 8c5a4c8054
Add gh packages build workflow (#40)
* Add canary build workflow

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Add release build workflow

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Split into jobs and fix dockerfile paths

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Add manual run

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Removed sha tags for release and changed workflow name

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Add latest tag

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Change to ghcr

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Remove comments and update runner version

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Remove manual workflow dispatch on release

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

* Update .github/workflows/build_release.yml

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>

* Update .github/workflows/build_release.yml

Signed-off-by: Lucas Santos <lhs.santoss@gmail.com>

Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>

* Update secret names

Signed-off-by: Lucas Santos <hello@lsantos.dev>

Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
2021-02-05 13:17:59 -08:00
Aaron Schlesinger ffd8857da0
Adding design doc (#31)
* Adding designdoc

Fixes https://github.com/kedacore/http-add-on/issues/18

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

* Fixing links to components

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

* Adding architecture diagram and assets

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

* Fixing link to operator

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

* Adding a walkthrough document

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

* removing duplicate walkthrough section

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-02-04 13:02:13 -08:00
Aaron Schlesinger 6545313d59
adding arschles as a codeowner (#46)
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-02-04 12:32:51 -08:00
Aaron Schlesinger 7502948b6b
adding a walkthrough document (#37)
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-02-03 12:18:36 -08:00
Aaron Schlesinger 698a5ee0c2
Creating 2 interceptor services (#16)
* 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>
2021-01-29 16:46:31 -08:00
Aaron Schlesinger 7b75262476
Starting to move components from prototype repo (#2)
* starting the scaler and interceptor

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

* Adding interceptor

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

* link to issue

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

* operator and CLI start

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

* starting on the dockerfiles

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

* Improving the operator Dockerfile

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

* fix

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

* note

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

* adding go based operator

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

* a bit of progress

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

* moving rust operator to old

will delete this shortly

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

* moving goperator to operator

forgot to do this last commit

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

* moving go.mod to root

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

* marking deprecated

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

* it builds
gs

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

* progress on the operator

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

* more progress

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

* more

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

* All my changes and implementations (#2)

* Fix error with existing variable

* Rename ScaledObject to HTTPScaledObject

* Add draft implementation for status spec

* Rename files to match new naming

* Remove scaffolding comments

* Change requeue time to 50s

* Variable renaming to better read

* Add new spec field to make polling configurable

* Remove previously added objects in case of error

* Set Statuses

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

* Fix Typos (#4)

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

* Add RBAC rules for services, pods and deployments (#5)

* Fix Typos

* Add RBAC rules for services, pods and deployments

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

* Bunch of changes (#6)

* Fix Typos

* Implement object deletion

* Add prefix for logging

* Remove unused status interface

* Add status check for "Ready"

* Golint

* Generate CRD Manifests

* Reorder RBAC Roles

* Change file namings

* Remove CLI part for now

* Add internal build context for operator

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

* Charts, docs, readability and other changes (#8)

* Fix Typos

* Implement object deletion

* Add prefix for logging

* Remove unused status interface

* Add status check for "Ready"

* Golint

* Generate CRD Manifests

* Reorder RBAC Roles

* Change file namings

* Remove CLI part for now

* Add internal build context for operator

* Remove Rust-related things

* Add comment docs and reorder packages

* Change variable name and add package docs

* Add package docs

* Add package docs

* Rename var for readability

* Adds package docs

* Remove commented code

* Remove unused admin echo server and rename current one

* Add more logging and docs

* Fix doc

* Update readme on cli

* Add scaffold to operator chart

* Add docs

* Golint

* Update name in kustomization

* Add descriptions to fields

* Update default image name

* Change resource names

* Add version tag to kustomization

* Add make command for charts

* Create base values file

* Add patch for image name

* Add environment variable to manager

* Update charts/operator/Chart.yaml

Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>

* Update charts/operator/Chart.yaml

Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>

* Correct dir name and reuse step

* Rename dir to keda-http-operator

* Add envs to deployment pkg

* Add new statuses for extended objetct

* Fixing interceptor listening port

* Include new "Terminating" status

* Add namespaces for logs

* Change variable names

* Add new statuses

* Code reorder

* Create interceptor

* Add missing return

* Remove comment

* Fix link

* Remove all references to external scaler address

This is because we'll use one external scaler for each new application, so there's no point in having a single environment variable controlling the
address of the external scaler.

The address will be defined by the operator for each new app and a new scaler will be created.

* Fixing external scaler port

* Code reorder and creation of external scaler

* Improve code readability

* Golint

* Add colons

* Further clean the code

* Move functions to other file

* Rename files

* Add more meaninful names

* Rename method

* Update roles and enums

* Make yamls

* Add next TODO

* Add todo

Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* Fixing the operator Dockerfile

also adding env vars to allow users to customize docker image names

Fixes https://github.com/kedacore/http-add-on/issues/5

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

* Updating to the KEDA 2.0 external scaler gRPC interface

The notable change here is that there is an added StreamIsActive
RPC call. The New and Close RPCs are removed.

Fixes https://github.com/kedacore/http-add-on/issues/3

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

* Making the scaler talk to interceptors to get pending HTTP queue sizes

Fixes https://github.com/kedacore/http-add-on/issues/4

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

* Initial install docs

Includes various tweaks needed to make install work

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

* more

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

* more progress

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

* proper port and path

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

* splitting up helm chart

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

* fix chart, example yaml, and fix panic in operator logging

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

* fixing log errors

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

* minor changes

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

* gracefully moving on when deleting kube resources

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

* creating dynamic client

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

* using proper group for scaled objects

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

* adding scaledobject to ClusterRole

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

* Helm installation in the Makefile

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

* more loggign

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

* properly specifying namespaces etc...

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

* setting operator deployment pull policy to always

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

* adding more logs to resource creation

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

* fixing namespace problems and simplifying code

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

* proper API version

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

* aking image names and ports for external scaler and interceptor configurable

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

* adding docs

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

* proper env var names

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

* Specifying proper external scaler ports

Also moving the application config in the operator into operator/config

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

* ports

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

* updated ScaledObject spec

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

* proper port formatting for interceptor

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

* more logging and not requeueing

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

* cscaler => kedahttp

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

* trying something out

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

* adding finalizer, simplifying get code

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

* finalizers

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

* ignoring more stuff

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

* removing the right things

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

* updating deletion & error logic

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

* logging status updates

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

* check for already exists inside specific creator logic

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

* Fiddling with status

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

* upgrading CRD version

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

* Adding instructions on microk8s installs

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

* Restoring the status file

Don't know why I deleted it in 021b5f1b76

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

* myapp => xkcd

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

* service type

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

* logging

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

* configuring services properly

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

* readme

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

Co-authored-by: Lucas Santos <lhs.santoss@gmail.com>
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
2021-01-27 11:41:52 -08:00
Zbynek Roubalik 71e93d35c6
Merge pull request #1 from kedacore/setup
Provide basic setup
2020-11-25 20:48:26 +01:00
Tom Kerkhove 44157ff8c3 Provide basic setup
Signed-off-by: Tom Kerkhove <kerkhove.tom@gmail.com>
2020-11-25 20:05:34 +01:00
Tom Kerkhove 29039c1967 Initial commit 2020-11-25 19:53:29 +01:00