-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add configMap informer #326
Conversation
770c43e
to
93b8eb5
Compare
@tpiperatgod thanks for this PR. Could you please share the error logs that you came across ? |
Sure, the error log is as follows:
|
@tpiperatgod thank you. I think maybe for now we could reduce the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tpiperatgod this looks great! I only have one suggestion below.
Also, regarding the resynchronization period, we can fetch an initial version of the routing table on startup before we start the informer loop? That way, we'll be able to immediately report true
for the IsActive
call, and can watch for changes with the informer from that point onward.
Thoughts?
I created a channel to receive the ConfigMap object from eventHandler(addEvtHandler, updateEvtHandler, deleteEvtHandler). When eventhandler get an event, it will pass the ConfigMap object to the StartConfigMapRoutingTableUpdater. This process is now independent with the resynchronization of informer's local cache. But it still throws the same exception. I will continue to debug it. |
93b8eb5
to
953d1d0
Compare
Hi folks, here is the flowchart of keda-http-add-on as I understand it, is it correct? If this flowchart is correct, I think it is possible that I also calculated the time consumption in |
@tpiperatgod yes, I think that flowchart is correct, if I'm reading it properly.
Yes, I think you're right. The design of
This time range is excellent.
The original duration was 500ms if I remember correctly. After testing a bit, we lowered it to 100 because it reduced scale-up latencies a bit but didn't put too much more load on the Kubernetes server. In reality, we could reduce it more because there won't be more than 1 scaler replica running at once. In the success case, however, this update duration doesn't matter much because changes should be applied via watch stream events. In other words, this duration is in place so that we can ensure that even if the watch stream is broken, the scaler will have an up-to-date routing table within 100ms (or whatever is configured in the To overcome this start-up problem, what if you fetched the routing table before reporting that the scaler is healthy via the health/liveness check? |
I think I probably know what the problem is, it's because the value of KEDA_HTTP_QUEUE_TICK_DURATION is too long. I have added a callback function to Also, I think we can deprecate the two environment variables:
Since we now use the informer-watch mechanism instead of the original loops. In the meantime, I introduced the environment variable KEDA_HTTP_SCALER_CONFIG_MAP_INFORMER_RSYNC_PERIOD to set the rsync time of the informer, the default value is 60m, need to discuss if this value is appropriate. |
c0b6978
to
2a21791
Compare
@tpiperatgod that's great to hear that you tracked down the exception. I will do another review of this PR on Monday. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tpiperatgod this is making really good progress. I only have a few smaller comments here
f34547a
to
e94e57e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tpiperatgod this looks great! I have two nit-pick comments, which we can address in a follow-up PR (in the interest of getting this merged) if you'd like. Let me know
(also, thank you for being patient on reviews. I was taking time off last week and am catching up this week)
@tpiperatgod the diagram you created in #326 (comment) would be very helpful to add to the project documentation. Is it ok with you if I add it? If so, I can do that. |
0fd6ed7
to
f2cbebf
Compare
Feel free to use it. 😄 And if you find any details that are inaccurately expressed, please let me know and I will fix it. |
callbackWhenRoutingTableUpdate := func() error { | ||
if err := pinger.fetchAndSaveCounts(ctx); err != nil { | ||
return err | ||
} | ||
return nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tpiperatgod instead of fetching and saving counts, what do you think about simply adding the hostname to the scaler's in-memory map and letting the pinger fetch counts as it currently does in its own loop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I understand your suggestion in this way:
- pass in the pinger to
StartConfigMapRoutingTableUpdater
- then add the element with key the hostname to
pinger.allCounts
in the processing
If so, then I used a generic function cbFunc
instead of passing in pinger directly, considering that pinger only runs in the scaler service, while StartConfigMapRoutingTableUpdater
is used by both the scaler and the interceptor.
As well fetchAndSaveCounts
is an already existing method, and it doesn't need to pass additional arguments, which helps make callbackWhenRoutingTableUpdate
a generic function, so maybe I should think it makes sense in this scenario?
Please correct me if I have misunderstood...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the same time, the pinger will keep its loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried passing in the pinger, but it doesn't seem to be very friendly, which means that the pinger for the scaler package needs to be imported in the routing package.
If using the in-memory map instead of pinger, I think the following error will still occur every time an HSO resource is created (although it does not affect the final result).
# You can see that q.Current() has been updated with the latest hostname
{"level":"info","ts":1638710224.7128677,"logger":"pkg.routing.StartConfigMapRoutingTableUpdater","caller":"routing/config_map_updater.go:79","msg":"updateQueueFromTable","counts":{"myhost.com":0}}
# However, IsActive will be triggered before pinger (frequently).
{"level":"error","ts":1638710224.8019505,"logger":"IsActive","caller":"scaler/handlers.go:72","msg":"Given host was not found in queue count map","host":"myhost.com","allCounts":{},"error":"host 'myhost.com' not found in counts","stacktrace":"main.(*impl).IsActive\n\t/go/src/github.com/kedacore/http-add-on/scaler/handlers.go:72\ngithub.jparrowsec.cn/kedacore/http-add-on/proto._ExternalScaler_IsActive_Handler\n\t/go/src/github.com/kedacore/http-add-on/proto/scaler_grpc.pb.go:139\ngoogle.golang.org/grpc.(*Server).processUnaryRPC\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1279\ngoogle.golang.org/grpc.(*Server).handleStream\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1608\ngoogle.golang.org/grpc.(*Server).serveStreams.func1.2\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:923"}
{"level":"error","ts":1638710224.810591,"caller":"scaler/handlers.go:97","msg":"error getting active status in stream, continuing","error":"host 'myhost.com' not found in counts","stacktrace":"main.(*impl).StreamIsActive\n\t/go/src/github.com/kedacore/http-add-on/scaler/handlers.go:97\ngithub.jparrowsec.cn/kedacore/http-add-on/proto._ExternalScaler_StreamIsActive_Handler\n\t/go/src/github.com/kedacore/http-add-on/proto/scaler_grpc.pb.go:156\ngoogle.golang.org/grpc.(*Server).processStreamingRPC\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1532\ngoogle.golang.org/grpc.(*Server).handleStream\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:1612\ngoogle.golang.org/grpc.(*Server).serveStreams.func1.2\n\t/go/pkg/mod/google.golang.org/[email protected]/server.go:923"}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I understand your suggestion in this way:
@tpiperatgod that would be one way to do it. it looks like a larger refactor might be in order, which we can certainly do in a follow-up pull request. if this works now as-is, then I'm fine with it!
for the follow-up, one possible refactor might be to have StartConfigMapRoutingTableUpdater
pass more information to the callback about what was updated, so that we can then immediately reflect the updates in the pinger. for example, we could pass the watch.Event
to the callback. I think we can look into this in more depth after this is merged.
Signed-off-by: laminar <[email protected]> Signed-off-by: laminar <[email protected]>
168710f
to
f1ffe38
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working through this, @tpiperatgod !
…error Plus more refactors as necessary Signed-off-by: Aaron Schlesinger <[email protected]> Updating the release process document with correct order of operations (kedacore#327) * updating the release process document Signed-off-by: Aaron Schlesinger <[email protected]> * adding information about the chart's images.tag field in values.yaml Signed-off-by: Aaron Schlesinger <[email protected]> Bump k8s.io/apimachinery from 0.22.3 to 0.22.4 (kedacore#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](kubernetes/apimachinery@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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump k8s.io/client-go from 0.22.2 to 0.22.4 (kedacore#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](kubernetes/client-go@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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump google.golang.org/grpc from 1.41.0 to 1.42.0 (kedacore#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](grpc/grpc-go@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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Aaron Schlesinger <[email protected]> Add configMap informer (kedacore#326) Signed-off-by: laminar <[email protected]> Signed-off-by: laminar <[email protected]> Co-authored-by: Aaron Schlesinger <[email protected]> Restore target to original replica count after deleting httpscaledobject resource. (kedacore#339) Signed-off-by: laminar <[email protected]> Signed-off-by: laminar <[email protected]> Co-authored-by: Aaron Schlesinger <[email protected]> Upgrading images to use Go 1.17.2 (kedacore#349) Adding documentation for how to issue curl requests (kedacore#347) Signed-off-by: Aaron Schlesinger <[email protected]> chore: Allow blank issues (kedacore#352) Signed-off-by: Tom Kerkhove <[email protected]> Bump github.com/magefile/mage from 1.11.0 to 1.12.1 (kedacore#360) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump google.golang.org/grpc from 1.42.0 to 1.43.0 (kedacore#358) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> converting bug report issue template to a form issue (kedacore#363) Signed-off-by: Aaron Schlesinger <[email protected]> Allowing cluster-global operation (kedacore#269) * Allowing cluster-global operation Signed-off-by: Aaron Schlesinger <[email protected]> * passing less unnecessary data in the operator Signed-off-by: Aaron Schlesinger <[email protected]> * setting namespace Signed-off-by: Aaron Schlesinger <[email protected]> * updating tests: Signed-off-by: Aaron Schlesinger <[email protected]> * Updating deployment cache interfaces To accommodate multi-namespace gets and watches Signed-off-by: Aaron Schlesinger <[email protected]> * starting on deployment cache informer Signed-off-by: Aaron Schlesinger <[email protected]> * switching over to informer-based deployment cache Signed-off-by: Aaron Schlesinger <[email protected]> * fixing test compile errors and merging fake and in-memory deployment caches Signed-off-by: Aaron <[email protected]> * fixing tests Signed-off-by: Aaron Schlesinger <[email protected]> * fixing more compile errs Signed-off-by: Aaron Schlesinger <[email protected]> * improving logging, and several other small changes Signed-off-by: Aaron Schlesinger <[email protected]> * go mod tidy Signed-off-by: Aaron Schlesinger <[email protected]> * Adding config validation Signed-off-by: Aaron Schlesinger <[email protected]> * improving ns and svc name var names to indicate interceptor Signed-off-by: Aaron Schlesinger <[email protected]> * running go mod tidy Signed-off-by: Aaron Schlesinger <[email protected]> * removing unused code Signed-off-by: Aaron Schlesinger <[email protected]> * passing a function to transform target to in-cluster URL Signed-off-by: Aaron Schlesinger <[email protected]> * not requiring namespace for operator Signed-off-by: Aaron Schlesinger <[email protected]> * splitting namespace config for operator into watch and current Signed-off-by: Aaron Schlesinger <[email protected]> * removing appInfo, passing current namespace everywhere in its place Signed-off-by: Aaron Schlesinger <[email protected]> * using proper namespace when creating scaled object Signed-off-by: Aaron Schlesinger <[email protected]> * allowing xkcd chart to set ingress namespace Signed-off-by: Aaron Schlesinger <[email protected]> * printing namespace in error Signed-off-by: Aaron Schlesinger <[email protected]> * using proper fully-qualified hostname of external scaler in scaledobject Signed-off-by: Aaron Schlesinger <[email protected]> * adding note on cluster-global vs. namespaced mode Signed-off-by: Aaron Schlesinger <[email protected]> * adding note about installing the xkcd chart in cluster-global mode Signed-off-by: Aaron Schlesinger <[email protected]> * fixing hostname test Signed-off-by: Aaron Schlesinger <[email protected]> * merging scaler queue counts with routing table hosts. removing merge functionality from interceptors Signed-off-by: Aaron Schlesinger <[email protected]> * fix assumption in tests that queue has all hosts from routing table Signed-off-by: Aaron Schlesinger <[email protected]> * adding test for MergeCountsWithRoutingTable Signed-off-by: Aaron Schlesinger <[email protected]> * sleep for longer to wait for server to start Signed-off-by: Aaron Schlesinger <[email protected]> * adding handler test for merging hosts Signed-off-by: Aaron Schlesinger <[email protected]> * adding test to GetMetrics test cases for host not in queue pinger Signed-off-by: Aaron Schlesinger <[email protected]> Return custom header when request was returned from a cold start (kedacore#366) * Add X-KEDA-HTTP-Cold-Start header - Add X-KEDA-HTTP-Cold-Start header - Change signature of forwardWaitFunc to include deployment.Status.ReadyReplicas Signed-off-by: Aaron Wislang <[email protected]> * Update tests for X-KEDA-HTTP-Cold-Start header Signed-off-by: Aaron Wislang <[email protected]> * Update interceptor/main_test.go Co-authored-by: Aaron Schlesinger <[email protected]> Signed-off-by: Aaron Wislang <[email protected]> * add bracket Signed-off-by: Aaron Wislang <[email protected]> Co-authored-by: Aaron Schlesinger <[email protected]> Updating dependencies (kedacore#348) * updating dependencies Signed-off-by: Aaron Schlesinger <[email protected]> * NullLogger => Discard() Signed-off-by: Aaron Schlesinger <[email protected]> * removing redundant import Signed-off-by: Aaron Schlesinger <[email protected]> * updating to use go 1.17.2 Signed-off-by: Aaron Schlesinger <[email protected]> * upgrading vulnerable packages Signed-off-by: Aaron Schlesinger <[email protected]> * upgrading sftp Signed-off-by: Aaron Schlesinger <[email protected]> * force-upgrading sftp Signed-off-by: Aaron Schlesinger <[email protected]> Bump go.uber.org/zap from 1.19.1 to 1.20.0 (kedacore#362) Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.19.1 to 1.20.0. - [Release notes](https://github.com/uber-go/zap/releases) - [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md) - [Commits](uber-go/zap@v1.19.1...v1.20.0) --- updated-dependencies: - dependency-name: go.uber.org/zap dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump github.com/go-logr/zapr from 0.4.0 to 1.2.2 (kedacore#357) Bumps [github.com/go-logr/zapr](https://github.com/go-logr/zapr) from 0.4.0 to 1.2.2. - [Release notes](https://github.com/go-logr/zapr/releases) - [Commits](go-logr/zapr@v0.4.0...v1.2.2) --- updated-dependencies: - dependency-name: github.com/go-logr/zapr dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump k8s.io/apimachinery from 0.23.1 to 0.23.2 (kedacore#376) Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.23.1 to 0.23.2. - [Release notes](https://github.com/kubernetes/apimachinery/releases) - [Commits](kubernetes/apimachinery@v0.23.1...v0.23.2) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump k8s.io/client-go from 0.23.1 to 0.23.2 (kedacore#375) Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.23.1 to 0.23.2. - [Release notes](https://github.com/kubernetes/client-go/releases) - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.23.1...v0.23.2) --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Compile binaries and docker images with git SHA (kedacore#377) * Compile binaries and docker images with git SHA Signed-off-by: Aaron Wislang <[email protected]> Signed-off-by: Ubuntu <azureuser@vm1.dwkkbikwkshepl1jlyp52keone.bx.internal.cloudapp.net> * Fix test Signed-off-by: Aaron Wislang <[email protected]> Signed-off-by: Ubuntu <azureuser@vm1.dwkkbikwkshepl1jlyp52keone.bx.internal.cloudapp.net> * Apply suggestions from @arschles Co-authored-by: Aaron Schlesinger <[email protected]> Signed-off-by: Ubuntu <azureuser@vm1.dwkkbikwkshepl1jlyp52keone.bx.internal.cloudapp.net> Co-authored-by: Aaron Schlesinger <[email protected]> Bump github.com/onsi/gomega from 1.17.0 to 1.18.0 (kedacore#378) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Configure WhiteSource Bolt for GitHub (kedacore#379) Co-authored-by: whitesource-bolt-for-github[bot] <42819689+whitesource-bolt-for-github[bot]@users.noreply.github.com> Co-authored-by: Tom Kerkhove <[email protected]> adding targetPendingRequests to the xkcd helm chart (kedacore#373) Signed-off-by: Aaron Schlesinger <[email protected]> fixing targetPendingRequests in the HTTPScaledObject v0.2.0 documentation (kedacore#372) Signed-off-by: Aaron Schlesinger <[email protected]> Add TestStreamIsActive (kedacore#384) * Return IsActive error vs log and continue Signed-off-by: Aaron Wislang <[email protected]> * Add TestStreamIsActive Signed-off-by: Aaron Wislang <[email protected]> * Bump github.com/onsi/gomega from 1.17.0 to 1.18.0 (kedacore#378) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Aaron Wislang <[email protected]> * Configure WhiteSource Bolt for GitHub (kedacore#379) Co-authored-by: whitesource-bolt-for-github[bot] <42819689+whitesource-bolt-for-github[bot]@users.noreply.github.com> Co-authored-by: Tom Kerkhove <[email protected]> Signed-off-by: Aaron Wislang <[email protected]> * adding targetPendingRequests to the xkcd helm chart (kedacore#373) Signed-off-by: Aaron Schlesinger <[email protected]> Signed-off-by: Aaron Wislang <[email protected]> * fixing targetPendingRequests in the HTTPScaledObject v0.2.0 documentation (kedacore#372) Signed-off-by: Aaron Schlesinger <[email protected]> Signed-off-by: Aaron Wislang <[email protected]> * defer grpcServer.Stop() Co-authored-by: Aaron Schlesinger <[email protected]> Signed-off-by: Aaron Wislang <[email protected]> * Don't check error for gprServer Signed-off-by: Aaron Wislang <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: whitesource-bolt-for-github[bot] <42819689+whitesource-bolt-for-github[bot]@users.noreply.github.com> Co-authored-by: Tom Kerkhove <[email protected]> Co-authored-by: Aaron Schlesinger <[email protected]> Bump go.uber.org/zap from 1.20.0 to 1.21.0 (kedacore#394) Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.20.0 to 1.21.0. - [Release notes](https://github.com/uber-go/zap/releases) - [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md) - [Commits](uber-go/zap@v1.20.0...v1.21.0) --- updated-dependencies: - dependency-name: go.uber.org/zap dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump google.golang.org/grpc from 1.43.0 to 1.44.0 (kedacore#390) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.43.0 to 1.44.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.43.0...v1.44.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump github.com/onsi/gomega from 1.18.0 to 1.18.1 (kedacore#393) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.18.0 to 1.18.1. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](onsi/gomega@v1.18.0...v1.18.1) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump k8s.io/apimachinery from 0.23.2 to 0.23.3 (kedacore#392) Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.23.2 to 0.23.3. - [Release notes](https://github.com/kubernetes/apimachinery/releases) - [Commits](kubernetes/apimachinery@v0.23.2...v0.23.3) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Bump k8s.io/api from 0.23.2 to 0.23.3 (kedacore#389) Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.23.2 to 0.23.3. - [Release notes](https://github.com/kubernetes/api/releases) - [Commits](kubernetes/api@v0.23.2...v0.23.3) --- updated-dependencies: - dependency-name: k8s.io/api dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fix shell typo in docs (kedacore#395) Signed-off-by: XinYang <[email protected]> fix documentation for creating an HTTPScaledObject (kedacore#351) * fix documentation for creating an HTTPScaledObject Signed-off-by: Marco Piovesana <[email protected]> * chore: Allow blank issues (kedacore#352) Signed-off-by: Tom Kerkhove <[email protected]> Signed-off-by: Marco Piovesana <[email protected]> * Bump github.com/magefile/mage from 1.11.0 to 1.12.1 (kedacore#360) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Marco Piovesana <[email protected]> * Bump google.golang.org/grpc from 1.42.0 to 1.43.0 (kedacore#358) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Marco Piovesana <[email protected]> * converting bug report issue template to a form issue (kedacore#363) Signed-off-by: Aaron Schlesinger <[email protected]> Signed-off-by: Marco Piovesana <[email protected]> * Allowing cluster-global operation (kedacore#269) * Allowing cluster-global operation Signed-off-by: Aaron Schlesinger <[email protected]> * passing less unnecessary data in the operator Signed-off-by: Aaron Schlesinger <[email protected]> * setting namespace Signed-off-by: Aaron Schlesinger <[email protected]> * updating tests: Signed-off-by: Aaron Schlesinger <[email protected]> * Updating deployment cache interfaces To accommodate multi-namespace gets and watches Signed-off-by: Aaron Schlesinger <[email protected]> * starting on deployment cache informer Signed-off-by: Aaron Schlesinger <[email protected]> * switching over to informer-based deployment cache Signed-off-by: Aaron Schlesinger <[email protected]> * fixing test compile errors and merging fake and in-memory deployment caches Signed-off-by: Aaron <[email protected]> * fixing tests Signed-off-by: Aaron Schlesinger <[email protected]> * fixing more compile errs Signed-off-by: Aaron Schlesinger <[email protected]> * improving logging, and several other small changes Signed-off-by: Aaron Schlesinger <[email protected]> * go mod tidy Signed-off-by: Aaron Schlesinger <[email protected]> * Adding config validation Signed-off-by: Aaron Schlesinger <[email protected]> * improving ns and svc name var names to indicate interceptor Signed-off-by: Aaron Schlesinger <[email protected]> * running go mod tidy Signed-off-by: Aaron Schlesinger <[email protected]> * removing unused code Signed-off-by: Aaron Schlesinger <[email protected]> * passing a function to transform target to in-cluster URL Signed-off-by: Aaron Schlesinger <[email protected]> * not requiring namespace for operator Signed-off-by: Aaron Schlesinger <[email protected]> * splitting namespace config for operator into watch and current Signed-off-by: Aaron Schlesinger <[email protected]> * removing appInfo, passing current namespace everywhere in its place Signed-off-by: Aaron Schlesinger <[email protected]> * using proper namespace when creating scaled object Signed-off-by: Aaron Schlesinger <[email protected]> * allowing xkcd chart to set ingress namespace Signed-off-by: Aaron Schlesinger <[email protected]> * printing namespace in error Signed-off-by: Aaron Schlesinger <[email protected]> * using proper fully-qualified hostname of external scaler in scaledobject Signed-off-by: Aaron Schlesinger <[email protected]> * adding note on cluster-global vs. namespaced mode Signed-off-by: Aaron Schlesinger <[email protected]> * adding note about installing the xkcd chart in cluster-global mode Signed-off-by: Aaron Schlesinger <[email protected]> * fixing hostname test Signed-off-by: Aaron Schlesinger <[email protected]> * merging scaler queue counts with routing table hosts. removing merge functionality from interceptors Signed-off-by: Aaron Schlesinger <[email protected]> * fix assumption in tests that queue has all hosts from routing table Signed-off-by: Aaron Schlesinger <[email protected]> * adding test for MergeCountsWithRoutingTable Signed-off-by: Aaron Schlesinger <[email protected]> * sleep for longer to wait for server to start Signed-off-by: Aaron Schlesinger <[email protected]> * adding handler test for merging hosts Signed-off-by: Aaron Schlesinger <[email protected]> * adding test to GetMetrics test cases for host not in queue pinger Signed-off-by: Aaron Schlesinger <[email protected]> Signed-off-by: Marco Piovesana <[email protected]> * Return custom header when request was returned from a cold start (kedacore#366) * Add X-KEDA-HTTP-Cold-Start header - Add X-KEDA-HTTP-Cold-Start header - Change signature of forwardWaitFunc to include deployment.Status.ReadyReplicas Signed-off-by: Aaron Wislang <[email protected]> * Update tests for X-KEDA-HTTP-Cold-Start header Signed-off-by: Aaron Wislang <[email protected]> * Update interceptor/main_test.go Co-authored-by: Aaron Schlesinger <[email protected]> Signed-off-by: Aaron Wislang <[email protected]> * add bracket Signed-off-by: Aaron Wislang <[email protected]> Co-authored-by: Aaron Schlesinger <[email protected]> Signed-off-by: Marco Piovesana <[email protected]> * Updating dependencies (kedacore#348) * updating dependencies Signed-off-by: Aaron Schlesinger <[email protected]> * NullLogger => Discard() Signed-off-by: Aaron Schlesinger <[email protected]> * removing redundant import Signed-off-by: Aaron Schlesinger <[email protected]> * updating to use go 1.17.2 Signed-off-by: Aaron Schlesinger <[email protected]> * upgrading vulnerable packages Signed-off-by: Aaron Schlesinger <[email protected]> * upgrading sftp Signed-off-by: Aaron Schlesinger <[email protected]> * force-upgrading sftp Signed-off-by: Aaron Schlesinger <[email protected]> Signed-off-by: Marco Piovesana <[email protected]> * Bump go.uber.org/zap from 1.19.1 to 1.20.0 (kedacore#362) Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.19.1 to 1.20.0. - [Release notes](https://github.com/uber-go/zap/releases) - [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md) - [Commits](uber-go/zap@v1.19.1...v1.20.0) --- updated-dependencies: - dependency-name: go.uber.org/zap dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Marco Piovesana <[email protected]> * Bump github.com/go-logr/zapr from 0.4.0 to 1.2.2 (kedacore#357) Bumps [github.com/go-logr/zapr](https://github.com/go-logr/zapr) from 0.4.0 to 1.2.2. - [Release notes](https://github.com/go-logr/zapr/releases) - [Commits](go-logr/zapr@v0.4.0...v1.2.2) --- updated-dependencies: - dependency-name: github.com/go-logr/zapr dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Marco Piovesana <[email protected]> * Bump k8s.io/apimachinery from 0.23.1 to 0.23.2 (kedacore#376) Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.23.1 to 0.23.2. - [Release notes](https://github.com/kubernetes/apimachinery/releases) - [Commits](kubernetes/apimachinery@v0.23.1...v0.23.2) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Marco Piovesana <[email protected]> * Bump k8s.io/client-go from 0.23.1 to 0.23.2 (kedacore#375) Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.23.1 to 0.23.2. - [Release notes](https://github.com/kubernetes/client-go/releases) - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.23.1...v0.23.2) --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Marco Piovesana <[email protected]> * Compile binaries and docker images with git SHA (kedacore#377) * Compile binaries and docker images with git SHA Signed-off-by: Aaron Wislang <[email protected]> Signed-off-by: Ubuntu <azureuser@vm1.dwkkbikwkshepl1jlyp52keone.bx.internal.cloudapp.net> * Fix test Signed-off-by: Aaron Wislang <[email protected]> Signed-off-by: Ubuntu <azureuser@vm1.dwkkbikwkshepl1jlyp52keone.bx.internal.cloudapp.net> * Apply suggestions from @arschles Co-authored-by: Aaron Schlesinger <[email protected]> Signed-off-by: Ubuntu <azureuser@vm1.dwkkbikwkshepl1jlyp52keone.bx.internal.cloudapp.net> Co-authored-by: Aaron Schlesinger <[email protected]> Signed-off-by: Marco Piovesana <[email protected]> * Bump github.com/onsi/gomega from 1.17.0 to 1.18.0 (kedacore#378) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Marco Piovesana <[email protected]> * Configure WhiteSource Bolt for GitHub (kedacore#379) Co-authored-by: whitesource-bolt-for-github[bot] <42819689+whitesource-bolt-for-github[bot]@users.noreply.github.com> Co-authored-by: Tom Kerkhove <[email protected]> Signed-off-by: Marco Piovesana <[email protected]> * adding targetPendingRequests to the xkcd helm chart (kedacore#373) Signed-off-by: Aaron Schlesinger <[email protected]> Signed-off-by: Marco Piovesana <[email protected]> * fixing targetPendingRequests in the HTTPScaledObject v0.2.0 documentation (kedacore#372) Signed-off-by: Aaron Schlesinger <[email protected]> Signed-off-by: Marco Piovesana <[email protected]> * Add TestStreamIsActive (kedacore#384) * Return IsActive error vs log and continue Signed-off-by: Aaron Wislang <[email protected]> * Add TestStreamIsActive Signed-off-by: Aaron Wislang <[email protected]> * Bump github.com/onsi/gomega from 1.17.0 to 1.18.0 (kedacore#378) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Aaron Wislang <[email protected]> * Configure WhiteSource Bolt for GitHub (kedacore#379) Co-authored-by: whitesource-bolt-for-github[bot] <42819689+whitesource-bolt-for-github[bot]@users.noreply.github.com> Co-authored-by: Tom Kerkhove <[email protected]> Signed-off-by: Aaron Wislang <[email protected]> * adding targetPendingRequests to the xkcd helm chart (kedacore#373) Signed-off-by: Aaron Schlesinger <[email protected]> Signed-off-by: Aaron Wislang <[email protected]> * fixing targetPendingRequests in the HTTPScaledObject v0.2.0 documentation (kedacore#372) Signed-off-by: Aaron Schlesinger <[email protected]> Signed-off-by: Aaron Wislang <[email protected]> * defer grpcServer.Stop() Co-authored-by: Aaron Schlesinger <[email protected]> Signed-off-by: Aaron Wislang <[email protected]> * Don't check error for gprServer Signed-off-by: Aaron Wislang <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: whitesource-bolt-for-github[bot] <42819689+whitesource-bolt-for-github[bot]@users.noreply.github.com> Co-authored-by: Tom Kerkhove <[email protected]> Co-authored-by: Aaron Schlesinger <[email protected]> Signed-off-by: Marco Piovesana <[email protected]> * Bump go.uber.org/zap from 1.20.0 to 1.21.0 (kedacore#394) Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.20.0 to 1.21.0. - [Release notes](https://github.com/uber-go/zap/releases) - [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md) - [Commits](uber-go/zap@v1.20.0...v1.21.0) --- updated-dependencies: - dependency-name: go.uber.org/zap dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Marco Piovesana <[email protected]> * Bump google.golang.org/grpc from 1.43.0 to 1.44.0 (kedacore#390) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.43.0 to 1.44.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.43.0...v1.44.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Marco Piovesana <[email protected]> * Bump github.com/onsi/gomega from 1.18.0 to 1.18.1 (kedacore#393) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.18.0 to 1.18.1. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](onsi/gomega@v1.18.0...v1.18.1) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Marco Piovesana <[email protected]> * Bump k8s.io/apimachinery from 0.23.2 to 0.23.3 (kedacore#392) Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.23.2 to 0.23.3. - [Release notes](https://github.com/kubernetes/apimachinery/releases) - [Commits](kubernetes/apimachinery@v0.23.2...v0.23.3) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Marco Piovesana <[email protected]> * Bump k8s.io/api from 0.23.2 to 0.23.3 (kedacore#389) Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.23.2 to 0.23.3. - [Release notes](https://github.com/kubernetes/api/releases) - [Commits](kubernetes/api@v0.23.2...v0.23.3) --- updated-dependencies: - dependency-name: k8s.io/api dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Marco Piovesana <[email protected]> * Update docs/walkthrough.md Co-authored-by: Aaron Schlesinger <[email protected]> Signed-off-by: Marco Piovesana <[email protected]> Co-authored-by: mpiovesana <[email protected]> Co-authored-by: Tom Kerkhove <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Aaron Schlesinger <[email protected]> Co-authored-by: Aaron Wislang <[email protected]> Co-authored-by: whitesource-bolt-for-github[bot] <42819689+whitesource-bolt-for-github[bot]@users.noreply.github.com> Bump k8s.io/client-go from 0.23.2 to 0.23.3 (kedacore#391) Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.23.2 to 0.23.3. - [Release notes](https://github.com/kubernetes/client-go/releases) - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.23.2...v0.23.3) --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Fix scaler crash (kedacore#399) Signed-off-by: Jakub Leska <[email protected]> Co-authored-by: Aaron Schlesinger <[email protected]>
Use client-go's informer to replace the custom routing table config map updater.
Checklist
README.md
docs/
directoryFixes #287
Additional information
When the configmap named "keda-http-routing-table" changes (e.g., a new httpscaledobjects is created), the external-scaler service will request keda to access the IsActive rpc of the http-add-on in the external-push mode.
However, since the minimum resynchronization period of the informer is 1s, the IsActive rpc request launched by keda will fail in the first 1s (this has no effect on the subsequent functionality, but there will be error log output).
Should we make StreamIsActive run after a 1 second delay? or just keep it.
And according to the optimization for the external-scaler(and interceptor) mentioned at https://hackmd.io/ttpSY5KQQtGIqbAzyKex3g, it will also solve this problem I think.
Signed-off-by: laminar [email protected]