-
Notifications
You must be signed in to change notification settings - Fork 592
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 persistent cache store backed by ConfigMap. Refactor mtping #3451
Add persistent cache store backed by ConfigMap. Refactor mtping #3451
Conversation
FYI. @nachocano @pierDipi |
I'm really not convinced mounting the configmap vs creating a watch is more efficient. Under the cover the kubelet creates a reflector for each pod with a mounted configmap (not verified): https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/util/manager/watch_based_manager.go#L149 Since HA works with watches, I think I'll stick with it (at least for now). @nachocano @pierDipi I know you have been looking at this. Any insights? Edit: more info: https://kubernetes.io/docs/concepts/configuration/configmap/#mounted-configmaps-are-updated-automatically. Specifically: |
52cf8a0
to
e6e6534
Compare
e6e6534
to
0a0275a
Compare
This pull request introduces 1 alert when merging 0a0275a into 5c276d0 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 706ae64 into 5c276d0 - view on LGTM.com new alerts:
|
b0dc2d4
to
0513cd3
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.
Look at minor issues
/lgm
event.SetExtension(key, override) | ||
} | ||
} | ||
|
||
ctx := context.Background() | ||
ctx = cloudevents.ContextWithTarget(ctx, sink) | ||
ctx = cloudevents.ContextWithTarget(ctx, cfg.SinkURI) |
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.
check for error returned?
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.
there is no error returned here.
f08ba82
to
3dfc311
Compare
this is really annoying. Can't reproduce locally :-( |
seems unrelated |
/test pull-knative-eventing-integration-tests |
Can you share more about the motivation for this? controller is watching for all the CRs already, are you running into issues there? |
This is for #3157. The gist of it is in this comment The main motivation is to be able to partition CRs across multiple receive adapters and to make sure they are HA. It seems natural to use a ConfigMap as our resource lock, which happens to also contain the resources the leading receive adapter needs to handle. At the same time, using a ConfigMap makes our receive adapters lighter weight since they don't need to store all CRs anymore. Note that GCPPubSub is already doing this I believe (except that it mounts the ConfigMap instead of setting a watch). The HA design follows the Does that make sense? @vaikas |
/lgtm |
@cr22rc: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The following is the coverage report on the affected files.
|
if entry, ok := a.entryids[key]; ok { | ||
a.Logger.Info("deleting schedule", zap.Any("key", key)) | ||
a.RemoveSchedule(entry.entryID) | ||
delete(a.entryids, key) |
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.
Don't you need some synchronization when you're messing with the map and using it in different places?
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.
The map in only used in this function and it is guaranteed to be called by only one go routine (see persistent_store)
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.
👍
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cr22rc, lionelvillard, vaikas The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The following jobs failed:
Failed non-flaky tests preventing automatic retry of pull-knative-eventing-integration-tests:
|
/test pull-knative-eventing-integration-tests |
One step towards #3157
Proposed Changes
Release Note
Docs