Skip to content
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 conversion for ObjectRef<K> to ObjectReference #815

Merged

Conversation

nightkr
Copy link
Member

@nightkr nightkr commented Feb 9, 2022

This covers step 1 and 2 of #812, allowing ObjectRef objects to be used for emitting events to a Recorder.

It does not change the Recorder interface (yet), since we don't have a cheap way to convert an ObjectReference into an ObjectRef<DynamicObject> (since ApiResource requires knowing the pluralized resource name).

@nightkr nightkr added the runtime controller runtime related label Feb 9, 2022
@nightkr nightkr self-assigned this Feb 9, 2022
@codecov-commenter
Copy link

codecov-commenter commented Feb 9, 2022

Codecov Report

Merging #815 (17bc64c) into master (fc6b8d9) will decrease coverage by 0.16%.
The diff coverage is 48.57%.

❗ Current head 17bc64c differs from pull request most recent head 3510980. Consider uploading reports for the commit 3510980 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #815      +/-   ##
==========================================
- Coverage   69.99%   69.83%   -0.17%     
==========================================
  Files          57       57              
  Lines        3906     3938      +32     
==========================================
+ Hits         2734     2750      +16     
- Misses       1172     1188      +16     
Impacted Files Coverage Δ
kube-runtime/src/controller/mod.rs 0.00% <0.00%> (ø)
kube-runtime/src/reflector/mod.rs 100.00% <ø> (ø)
kube-runtime/src/reflector/object_ref.rs 68.29% <51.51%> (-11.71%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fc6b8d9...3510980. Read the comment docs.

This covers step 1 and 2 of kube-rs#812, allowing `ObjectRef` objects to be used for
emitting events to a `Recorder`.

Signed-off-by: Teo Klestrup Röijezon <[email protected]>
Signed-off-by: Teo Klestrup Röijezon <[email protected]>
@nightkr nightkr force-pushed the feature/objectref-to-objectreference branch from c9e0abb to c27d07c Compare February 9, 2022 16:12
Signed-off-by: Teo Klestrup Röijezon <[email protected]>
@clux clux added this to the 0.69.0 milestone Feb 9, 2022
@clux clux added the changelog-add changelog added category for prs label Feb 9, 2022
@nightkr nightkr merged commit 4907b0a into kube-rs:master Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-add changelog added category for prs runtime controller runtime related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants