Commit Graph

21 Commits

Author SHA1 Message Date
Jorge Turrado Ferrero 9afe55b5fc
chore: Bump go version and deps (#1305)
* chore: Bump go version and deps

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

* Bump golangci

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

* Bump golangci

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

---------

Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
2025-07-25 11:34:31 +00:00
shayrybak d15f4428cf
Add support for initialCooldownPeriod On httpScaledObjects (#1212)
* Add support for initialCooldownPeriod On httpScaledObjects

Signed-off-by: Shay Rybak <shay.rybak@similarweb.com>

* update changelog

Signed-off-by: Shay Rybak <shay.rybak@similarweb.com>

* make manifests

Signed-off-by: Shay Rybak <shay.rybak@similarweb.com>

* Update InititalCooldownPeriod to *int32

Signed-off-by: Shay Rybak <shay.rybak@similarweb.com>

* nil ptr check for setting initialCooldownPeriod

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

* make generate manifests

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

---------

Signed-off-by: Shay Rybak <shay.rybak@similarweb.com>
Signed-off-by: Jan Wozniak <wozniak.jan@gmail.com>
Co-authored-by: Jan Wozniak <wozniak.jan@gmail.com>
2025-02-21 12:38:36 +00: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 6453b18638
feat: Propagate HTTPScaledObject labels and annotations to ScaledObject (#899) 2024-01-27 13:45:51 +01:00
Jorge Turrado Ferrero 214431250a
feat: Add support for any resource which implementes `/scale` subresource (#852) 2023-12-13 16:33:28 +01:00
Jocelyn Thode 8ee27fdf6e
fix: align polling interval to 15 seconds (#829) 2023-11-21 21:09:45 +00:00
Jorge Turrado Ferrero 04204c20bd
chore: bump deps (#700) 2023-08-22 14:10:09 +02:00
Pedro Tôrres 6cdec14001
Remove ScaledObject Custom Labels (#721)
Co-authored-by: Tom Kerkhove <kerkhove.tom@gmail.com>
Co-authored-by: Jorge Turrado Ferrero <jorge.turrado@scrm.lidl>
2023-06-27 09:00:05 +02:00
Pedro Tôrres fb17e777c9
HTTPSO-based Routing Table (#669) 2023-06-15 00:33:59 +02:00
Jocelyn Thode e0e959657e
feat: Move http scaled object from single host to multi host system (#674)
Co-authored-by: Somesh Koli <somesh.koli@headout.com>
2023-05-26 17:28:51 +02:00
Pedro Tôrres 3bd29c22df
controller: use kedav1alpha1.ScaledObject default values (#610)
Co-authored-by: Pedro Tôrres <pedrotorres@microsoft.com>
2023-02-28 01:19:13 +01:00
Somesh Koli 71c2d3ef9e
feat: expose cooldownPeriod param to httpScaledObject (#563) 2023-01-06 07:57:38 +01:00
Aaron Schlesinger 81f1f75da7
Patching ScaledObjects in the operator when they already exist (#402)
* patching scaledobjects that already exist

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

* updating test to check for updates

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2022-02-18 12:36:20 -08: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
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
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 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 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