-
Notifications
You must be signed in to change notification settings - Fork 305
Add convenient model extensions #405
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 convenient model extensions #405
Conversation
/assign @krabhishek8260 |
I'll wait for this PR to be rebased on the other one when it merges. |
8975fc4
to
8159929
Compare
Okay, I think that's done. |
8159929
to
58e135d
Compare
I'm pretty sure that test failure is unrelated to my changes. Any way to rerun them? |
|
re-triggered |
Magic. But now it needs a rebase anyway. :-P |
there is a re-run button on top-right of console output |
58e135d
to
8dde3ac
Compare
I don't have this button. Maybe you have more permissions then I do |
Couple more comments. |
Addressed. |
Tried using this as part of controller codebase. Very convenient - hope it gets merged in soon. One method I recommend you add that I found wanting: AddOwnerReference(IKubernetesObject) |
I had methods for creating object and owner references but removed them because my implementation relied on the KubernetesScheme class which was part of the fluent API PR. (I could easily implement them a different way here, but then I wouldn't be able to have the KubernetesScheme-based versions in the fluent API). Anyway, AFAIK think this PR is ready to merge if people want it... |
Imo you should reopen that pr, just isolate it into own assembly like I did
with informers
…On Sat., Apr. 25, 2020, 6:17 p.m. admilazz, ***@***.***> wrote:
Tried using this as part of controller codebase. Very convenient - hope it
gets merged in soon. One method I recommend you add that I found wanting:
AddOwnerReference(IKubernetesObject)
I had methods for creating object and owner references but removed them
because my implementation relied on the KubernetesScheme class which was
part of the fluent API PR. (I could easily implement them a different way
here, but then I wouldn't be able to have the KubernetesScheme-based
versions in the fluent API).
Anyay, AFAIK think this PR is ready to merge if people want it...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#405 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAINFWGVD56UAZSM6MBXOCLRONOP5ANCNFSM4MDR6Y3Q>
.
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: admilazz, brendandburns 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 |
This change adds a many useful model extension methods that make the Kubernetes client smoother and more concise to use. This change helps address issue #390 .
Metadata is inlined, so instead of o.Metadata.X, you can use o.X(). Examples:
Managing labels and annotations. Examples for labels:
becomes
Similarly,
becomes
Managing owner and object references
And some other small things.
The pull request depends on (and includes) the IKubernetesObject<T> PR I submitted earlier: #404 The only changes in this PR specifically belong to the ModelExtensions.cs file. (I'm not sure how best to represent that in a PR...)