-
Notifications
You must be signed in to change notification settings - Fork 759
[Feat] add user annotations to k8s objects #6710
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
base: master
Are you sure you want to change the base?
[Feat] add user annotations to k8s objects #6710
Conversation
Signed-off-by: ttitsworth-fsp <[email protected]>
|
Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line:
|
Signed-off-by: ttitsworth-fsp <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6710 +/- ##
==========================================
+ Coverage 59.72% 59.76% +0.03%
==========================================
Files 929 929
Lines 57995 58051 +56
==========================================
+ Hits 34638 34694 +56
Misses 20205 20205
Partials 3152 3152
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hey @davidmirror-ops it looks like there's an issue with pulling helm on a bunch of the tests, is this expected? I'm working on updating the code coverage to get things green. |
Signed-off-by: ttitsworth-fsp <[email protected]>
|
@ttitsworth-lila yes, that's still a limitation on the current version of CI. Could you run |
Signed-off-by: ttitsworth-fsp <[email protected]>
|
@davidmirror-ops no problem, done. |
|
We do something similar internally since the principal is not passed from the control plane to the data plane, and thus can't be rendered into the k8s manifests in propeller. I will review this more deeply later. |
@Sovietaced Thanks for the comment. I'd love to understand more about what you mean. Presently I'm testing this in a multi-cluster setup where my above method is able to pass that information. What IDP provider do you use internally? |
Signed-off-by: ttitsworth-fsp <[email protected]>
Not sure what you mean with regards to IDP. What I'm trying to say is that flyte admin (the control plane) has the identity information when the user calls the API to create an execution. None of that information is passed down into the workflow resource and as a result is unusable by the flyte propeller (the data plane). So like you've done here we inject some of that information into the workflow annotations which isn't super elegant, but it works. Arguably the workflow spec should embed some information about the user identity in a more structured way. |
Signed-off-by: ttitsworth-fsp <[email protected]>
Like your suggestion @Sovietaced , but would require a lot more changes across the stack to include in the spec but the current PR can be considered incremental and adds a benefit for having identity info in the dataplane. |
Signed-off-by: ttitsworth-fsp <[email protected]>
|
Thanks for the review @pmahindrakar-oss, I just pushed a change to improve the coverage. I'm having some issues running Hope this is acceptable, and would appreciate some help with landing this PR :) |
The DNS issue looks like possible company VPN / firewall not resolving approved domains |
fixed it here #6726 |
|
Got some conflicts |
Signed-off-by: Tyler Titsworth <[email protected]>
|
Bito Review Skipped - No Changes Detected |
Why are the changes needed?
Presently when submitting workflows via Flyte, it's hard to know who submitted what. This PR addresses one of two concerns:
Why do I/we care about 2? Let's say you have two teams (A & B), if team A has access to 10 resources and team B has access to 1000 resources and we know who is in each team (exclusively). One can create further admission controls for any user in team A that requests more resources than are allotted to that team. Furthermore, this can be tracked properly with Kueue.
Today when I submit a Flyte workflow I have no way to actually know who submitted what from a k8s perspective because principal information is not passed to the downstream k8s
flyteworkflowobject.What changes were proposed in this pull request?
This PR adds a parameter that enables a new annotation to be injected into each flyteworkflow object that contains the user
principal, which usually carries oauth information. Additionally, it allows customization of the annotation prefix.How was this patch tested?
I added some unit tests, and I also tested in production with the
flyte-corechart on EKS and using Keycloak:Labels
Please add one or more of the following labels to categorize your PR:
This is important to improve the readability of release notes.
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link
Summary by Bito