Repository navigation
Certificate controller to only watch secrets with a label - #225
Conversation
|
/retest |
1 similar comment
|
/retest |
Codecov Report
@@ Coverage Diff @@
## main #225 +/- ##
==========================================
- Coverage 82.66% 72.89% -9.77%
==========================================
Files 21 23 +2
Lines 1090 1380 +290
==========================================
+ Hits 901 1006 +105
- Misses 148 317 +169
- Partials 41 57 +16
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
Cool we hit a problem with this downstream and were planning to fix it. :) |
| // the queue through an implementation of controller.Reconciler, delegating to | ||
| // the provided Interface and optional Finalizer methods. OptionsFn is used to return | ||
| // controller.ControllerOptions to be used by the internal reconciler. | ||
| func NewFilteredImpl(ctx context.Context, r Interface, secretInformer informersv1.SecretInformer, options ...controller.Options) *controller.Impl { |
There was a problem hiding this comment.
The old secret controller impl is not usable any more?
There was a problem hiding this comment.
the existing generated secret controller in the pkg repo doesn't let pass in a filtered informer and that already has the import to pull in the regular informer, so makes this not work
|
Imports modify a global var - and I think it will cause the non filter
informer to run.
You can confirm but that’s why I think we need to not use that reconciler
…On Tue, Nov 1, 2022 at 14:39 Nader Ziada ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pkg/certificates/reconciler/controller_impl.go
<#225 (comment)>
:
> +
+import (
+ context "context"
+ fmt "fmt"
+ reflect "reflect"
+ strings "strings"
+
+ zap "go.uber.org/zap"
+ corev1 "k8s.io/api/core/v1"
+ watch "k8s.io/apimachinery/pkg/watch"
+ informersv1 "k8s.io/client-go/informers/core/v1"
+ scheme "k8s.io/client-go/kubernetes/scheme"
+ v1 "k8s.io/client-go/kubernetes/typed/core/v1"
+ record "k8s.io/client-go/tools/record"
+ client "knative.dev/pkg/client/injection/kube/client"
+ secretreconciler "knative.dev/pkg/client/injection/kube/reconciler/core/v1/secret"
I'm only pulling in the secretreconciler to use the reconciler.go file
which doesn't import the secret informer and allows me to pass in the the
filtered lister defined in the above step.
Do you prefer if I have a new implementation of the reconciler here as
well?
—
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAERATMTPS3SNUR4WIAGCTWGFPUHANCNFSM6AAAAAARR3PZEM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
As far as I can tell from running the tests, even if the regular secret informer is running, its not the one used by the controller. The filtered informer is the one used by the controller which is the main reason I had to do the specific controller impl so I can pass in the informer I create. If I can't use the reconciler package from the pkg repo at all, then it would be a much bigger change which is fine I guess, but I didn't want to make this work completely different than everything else. I will try to make a different reconciler and see how that goes |
|
@dprotaso added reconciler as well |
Just having the regular informer running will cause a leak since it will fill it's cache with secrets |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dprotaso, nader-ziada The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
1 similar comment
|
/retest |
|
/lgtm |
|
/cherry-pick release-1.7 |
|
@rachitchauhan43: only knative-sandbox org members may request cherry picks. You can still do the cherry-pick manually. DetailsIn 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. |
|
/cherry-pick release-1.8 |
|
@evankanderson: new pull request created: #253 DetailsIn 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. |
|
Cherry-picking to 1.7 and 1.8 due to reports here: https://cloud-native.slack.com/archives/C04LMU0AX60/p1674692609842299 |
|
/cherry-pick release-1.7 |
|
@evankanderson: new pull request created: #254 DetailsIn 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. |
Changes
/kind enhancement
Release Note