-
Notifications
You must be signed in to change notification settings - Fork 351
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
feat: support secret controller #284
Conversation
Codecov Report
@@ Coverage Diff @@
## master #284 +/- ##
==========================================
+ Coverage 52.19% 52.26% +0.06%
==========================================
Files 33 32 -1
Lines 2320 2319 -1
==========================================
+ Hits 1211 1212 +1
+ Misses 952 950 -2
Partials 157 157
Continue to review full report at Codecov.
|
pkg/ingress/controller/secret.go
Outdated
|
||
c.workqueue.AddRateLimited(&types.Event{ | ||
Type: types.EventAdd, | ||
Object: obj, |
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.
It would be better to pass key
as the object, because there is a time window between we put the event into queue and we process it, in such period, the object mapped by key
might be changed again in theory.
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 add Key field in types.Event
, keep the original meaning of Object
, because we do need some object information, when data is not available or an error is reported based on the 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.
If data is not available, why we should still process on it? It always means the Kubernetes Control Plane is in trouble, or the networking is partitioned, or the object was deleted, in such a case, just return error and use the retry mechanism is OK.
And, I didn't see other objects fields referred.
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.
Yes, we have verified, if Data not available, will return error.
But we also need to record some message such as resouceVersion, which is in the object.
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.
Have changed obj to key.
@gxthrj PR's look good to me, but we should add more descriptions about |
Please answer these questions before submitting a pull request
Why submit this pull request?
Bugfix
New feature provided
Improve performance
Backport patches
Related issues
request help: SSL need to be updated when secret has been modified. #221