-
Notifications
You must be signed in to change notification settings - Fork 4
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
Cache minimal data #52
Conversation
d4fad1b
to
fac769e
Compare
/test e2e |
just making sure, once we will support hot unplug, we will use the VMI informer to get VMI.status |
I am unsure as to how / when we'll support that, but surely we won't care about the pod's status or spec when implementing it. And if we end up requiring it (for whatever reason), let's adapt the code to make it work. |
if !ok { | ||
return obj, 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.
i am not familiar with Transform functions by heart
should it return error here ? or it is fine as you did because it can catch other types and if the cast failed it should just ignore and continue ?
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.
This is common for all types which we use in controller runtime (pods / vmis / vms).
I just want to act on pods.
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
also clean main branch failing |
#56 |
please rebase, tests might work now |
We only need the pod name / namespace / annotations / labels. Thus we prune everything else. Signed-off-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
fac769e
to
640b69b
Compare
Thanks |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: maiqueb 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 |
What this PR does / why we need it:
This PR prunes the unnecessary pod information before caching it in the informer.
We only need a subset of the metadata present in the pods, and we for sure do not care about its spec or status.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
This PR supersedes #14
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.
Release note: